Keep delimiters from pairing across runs in one paragraph - #46
Open
AbhinavMir wants to merge 1 commit into
Open
Conversation
A delimiter with nothing to pair with is inert, so it was left unescaped. That check ran over one run, but Markdown pairs across the whole paragraph: two runs each ending in a backtick put two of them on the line, and the text between became a code span. Emphasis and links went the same way, so a paragraph reading `see [` / `note](http://example.com)` came out as a working hyperlink the document never had. Runs that still have content after them now escape their pairable delimiters, which leaves at most one raw delimiter per paragraph, at the end, where nothing can reach it. Link labels and image alt text count as having content after them, since `](url)` always follows. Across 684 generated paragraphs pairing delimiters over a hard break, 44 converted to markup that was not in the document; none do now. The fixture corpus is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs that still have content after them now escape their pairable delimiters, so at most one raw delimiter survives per paragraph and nothing can pair with it.
For issue #45.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.