Skip to content

Commit

Permalink
Fix: Doclets examples
Browse files Browse the repository at this point in the history
Closes #224
  • Loading branch information
sapegin committed Nov 11, 2016
1 parent 4696c57 commit 5d9222c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion loaders/props.loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function propsToCode(doc) {
if (doc.doclets.example) {
return code.replace(
JSON.stringify(REQUIRE_PLACEHOLDER),
requireIt(JSON.stringify('examples!' + doc.doclets.example))
requireIt('examples!' + doc.doclets.example)
);
}
return code;
Expand Down
2 changes: 1 addition & 1 deletion test/loaders.props.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ test('should extract doclets', t => {
}, readFileSync(file, 'utf8'));
t.truthy(result);
t.notThrows(() => new Function(result), SyntaxError); // eslint-disable-line no-new-func
t.true(result.includes('require("\\"examples!./examples.md\\"")'));
t.true(result.includes('require("examples!./examples.md")'));
});

0 comments on commit 5d9222c

Please sign in to comment.