Inline code escape improvement #533
Merged
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.
This aims to have inline code escaping act more as one would expect in relation to how escaping is handled elsewhere. The best way to explain is by referencing the tests and babelmark https://johnmacfarlane.net/babelmark2/?text=%5C%5C%60code%60. Python Markdown is 1 of 3 who handle code escaping in (what I view) a non intuitive way. My personal belief is this buggy logic. So hopefully this pull will be accepted.
All we are doing is processing the escapes specifically related to code before we handle code.
Now, I realize the old tests were testing for this logic, and I understand why it was easiest to implement it as it was. If the old logic is preferred, I will need to make one more pull to make tables expect code escaping as it currently is. It should be a very easy pull, but I am hoping that this pull would be favored over such actions.