Skip to content

Commit

Permalink
fix: allow comments to contain --
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Sep 10, 2021
1 parent 2a5792f commit d6c3b48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-mdx/src/regexp.ts
Expand Up @@ -23,7 +23,7 @@ export const openTag = '<[A-Za-z]*[A-Za-z0-9\\.\\-]*' + attribute + '*\\s*>'
export const closeTag = '<\\s*\\/[A-Za-z]*[A-Za-z0-9\\.\\-]*\\s*>'
export const selfClosingTag =
'<[A-Za-z]*[A-Za-z0-9\\.\\-]*' + attribute + '*\\s*\\/?>'
export const comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->'
export const comment = '<!--(?:[^-]|-(?:[^-]|-+[^->]))*-*-->'
export const commentOpen = '(<!---*)'
export const commentClose = '(-*-->)'
export const commentContent = `${commentOpen}([\\s\\S]*?)${commentClose}`
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/comments.mdx
@@ -0,0 +1 @@
<!-- eslint-disable-next-line no-console -- Here's a description about why this configuration is necessary. -->

0 comments on commit d6c3b48

Please sign in to comment.