Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jescalan committed Oct 10, 2019
1 parent 9d84968 commit 2f92451
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/include-markdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ module.exports = function includeMarkdownPlugin({ resolveFrom } = {}) {
if (node.type !== 'paragraph') return [node]

// detect an `@include` statement
const includeMatch = node.children[0].value.match(
/^@include\s['"](.*)['"]$/
)
const includeMatch =
node.children[0].value &&
node.children[0].value.match(/^@include\s['"](.*)['"]$/)
if (!includeMatch) return [node]

// read the file contents
Expand Down

0 comments on commit 2f92451

Please sign in to comment.