diff --git a/README.md b/README.md index df744027..fb39db3b 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,11 @@ for more info. Releases -------- +### 0.5.5: 2017-02-22 + +- Fix @example macro to work with sassdoc v2.2.0. See + [https://github.com/SassDoc/sassdoc/commit/842847493f9644e50f9e2ce783eacf886ccf69a0][]. + ### 0.5.4: 2017-01-16 - Render type `html` examples to HTML. Closes diff --git a/index.js b/index.js index 030d5cba..ffebaec1 100644 --- a/index.js +++ b/index.js @@ -408,7 +408,11 @@ module.exports.annotations = [ * and put the result in the `rendered` property of the parsed example. */ function example (env) { - var baseExample = require('sassdoc/dist/annotation/annotations/example')(); + var baseExampleFn = require('sassdoc/dist/annotation/annotations/example'); + if (typeof baseExampleFn !== 'function') { + baseExampleFn = baseExampleFn.default; + } + var baseExample = baseExampleFn(); return { name: 'example', parse: baseExample.parse, diff --git a/package.json b/package.json index 4167c9a6..fb9bceee 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sassdoc-theme-herman", "description": "An Odd SassDoc theme.", - "version": "0.5.4", + "version": "0.5.5", "keywords": [ "sassdoc-theme" ],