-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Link redos #1426
Link redos #1426
Conversation
I'm not sure this is a great fix. The test still takes a few hundred milliseconds. |
I tried a different approach but this seems better! It's far from perfect though. I think this issue is inherent in the way links and code spans bind. So, for example: [foo`](url)` <-- this is not a link
[`foo]`](url) <-- neither is this
[foo`](url) <-- but this is
[foo`](url)`` code `` <-- and this too.
[foo`](url)``code` <-- these are just two code spans sitting back-to-back Whenever we try to match a link, if we find a Line 546 in c679e5e
I think we should consider trying to resemble the codespan matching regex to avoid backtracking too much. Something along the lines of If you want to merge this fix in the mean time, that's fine too! |
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.
Looks good, besides adding butt
to the repo 😆
Marked version: master
Description
Fixes redos when code blocks are in square brackets that are not links.
Contributor
Committer
In most cases, this should be a different person than the contributor.