diff --git a/packages/mdx/test/index.test.js b/packages/mdx/test/index.test.js index 3ae6b089a..db265b47d 100644 --- a/packages/mdx/test/index.test.js +++ b/packages/mdx/test/index.test.js @@ -171,7 +171,7 @@ COPY start.sh /home/start.sh ) }) -it.skip('Should support comments', async () => { +it('Should support comments', async () => { const result = await mdx(` A paragraph diff --git a/packages/remark-mdx/index.js b/packages/remark-mdx/index.js index 9ad335a4a..3d4185aec 100644 --- a/packages/remark-mdx/index.js +++ b/packages/remark-mdx/index.js @@ -9,6 +9,7 @@ const EMPTY_NEWLINE = '\n\n' const LESS_THAN = '<' const GREATER_THAN = '>' const SLASH = '/' +const EXCLAMATION = '!' const isImport = text => IMPORT_REGEX.test(text) const isExport = text => EXPORT_REGEX.test(text) @@ -69,6 +70,7 @@ function attachParser(parser) { if ( nextChar !== GREATER_THAN && nextChar !== SLASH && + nextChar !== EXCLAMATION && !isAlphabetical(nextChar) ) { return