Skip to content

Commit 6e665b5

Browse files
committed
1.0.1-beta: options.debug
1 parent 87ab191 commit 6e665b5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "markdown-feat-react-loader",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Use React Components inside markdown, import markdown as React Component",
55
"main": "lib/index.js",
66
"scripts": {

src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ module.exports = function markdownFeatReact(content) {
125125
renderer: defaultRenderer,
126126
}, loaderUtils.getOptions(this) || {})
127127

128-
const { renderer } = query
128+
const { renderer, debug } = query
129129

130130
const ast = parser.parse(content)
131131

@@ -261,8 +261,14 @@ module.exports = function markdownFeatReact(content) {
261261
)
262262
}
263263
`
264+
264265
const source = `${header}
265266
${code}`;
267+
268+
if (debug) {
269+
console.log(debug);
270+
}
271+
266272
const result = repl(source).code;
267273

268274
return result

0 commit comments

Comments
 (0)