Repository navigation
[io] Escape the named character references of the text in the Markdown export - #2241
Open
RavSinghChandan wants to merge 1 commit into
Open
RavSinghChandan wants to merge 1 commit into
RavSinghChandan wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2241 +/- ##
=======================================
Coverage 98.28% 98.29%
=======================================
Files 182 182
Lines 13165 13168 +3
=======================================
+ Hits 12939 12943 +4
+ Misses 226 225 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
…n exportMarkdown reads a named character reference as the character it names, so the OCR text
© 2024of a page was exported as "© 2024", and&as "&", and<div>as "The ampersand of a named reference is now escaped (
\©), which renders as the text of the page. Only a name that exists in the HTML5 list is escaped, soR&D,AT&T,Q&A;and a lone&are kept as they are. I exported about 3,000 generated lines of words with special characters and rendered them with markdown-it: the lines whose text came back changed fell from 582 to 77, and none of the 77 is a reference (they are lines made only of spaces, and a line starting with~~~, which is a separate case). 9 test cases, 4 fail without the change (the others are the cases that must not change).