-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add support for backslash escape in wikilinks #471
Conversation
Run on Wed Sep 25 23:28:09 UTC 2024 |
Ran fuzzing and got a failure
Reproduction input
I'll try and track it down tomorrow. |
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.
LGTM with one minor change (see comment), and escapes already roundtrip correctly in the CommonMark formatter!
src/parser/inlines.rs
Outdated
} | ||
} | ||
|
||
container.append(self.make_inline( |
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.
Let's check if startpos != offset
here, otherwise we'll append an empty span when a wikilink title ends in an escaped character.
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.
Great point, thank you @kivikakk. Done.
After fixing the string overrun, I ran fuzzing for about 18 hours, no problems |
Yes, LGTM! |
@kivikakk wdyt, could we cut a release for this? |
Adds support for using markdown backslash escapes in wikilink titles. So you can now use
[
and]
in the title. For example[[Name \[of\] page]]
or[[Name \[of\] page|https://example.org]]
Closes #470