-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow comments to contain --
#348
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Codecov Report
@@ Coverage Diff @@
## master #348 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 507 507
Branches 109 109
=========================================
Hits 507 507
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, it's cool, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
--
cc @wooorm |
✅ |
This change allows comments to contain
--
, which currently they can't, e.g.<!-- eslint-disable-next-line no-console -- Here's a description about why this configuration is necessary. -->
I suspect this is already fixed in #284, by upgrading to micromark. This PR adds a test and patches the comment regexp in the meantime.
remark-parse (where this regexp originally came from) went directly from our current regexp to micromark, which doesn't use an equivalent.
I used the following to automatically construct this corrected, "strings that don't contain
-->
" regexp, substitutingaab
for-->
because it only allows alphanumerics, etc.: http://www.formauri.es/personal/pgimeno/misc/non-match-regex/?word=aab