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: Support escapes within emphasis #2627
Changes from 4 commits
41270b8
2ee7bfd
8e1aa37
2fbf745
b365f2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<p><strong>strong text[</strong>]</p> | ||
|
||
<p><strong>strong text\[</strong>]</p> | ||
|
||
<p><em>em[pha](sis)</em></p> | ||
|
||
<p><em>\</em></p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**strong text\[**\] | ||
|
||
**strong text\\\[**\] | ||
|
||
_em\[pha\]\(sis\)_ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have one and three backslashes; could you add an example with 2 backslashes just for completeness? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have good intuition! Done, with a supporting bug fix. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's one of the cases that is not yet handled correctly as of this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, ok. |
||
|
||
_\\_ |
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.
@UziTech Similar to my comment on #2628, would this whole PR (and #2628) be cleaner if we just pre-masked out all escaped characters (not just
*
and_
)? Rather than each tokenizer trying to handle escaped characters in its own way?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.
I think that would require a lot more work trying to make sure we mask out the right characters everywhere. #2628 and this PR are two separate PRs doing two different things. I think we should merge this PR pretty much how it is. If we want to consolidate how things are done after merging this we can.