Skip to content
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

refactor(parser/renderer): special characters at parser level #734

Merged

Conversation

xcoulon
Copy link
Member

@xcoulon xcoulon commented Jul 19, 2020

Parsing special characters ('>', '<', '&') and also
'+' (for compatibility of output with Asciidoctor)

These special characters are stored in the new SpecialCharacter
type and can be converted into HTML entities in the HTML5
and XHTML5 backends. Other backends may decide to display
the values as-is.
This removes the introduction of HTML entities during
attribute substitutions (which would cause troubles for
future backends) and also, removes the need to
the sanitized type (an alias for html.HTML)

Fixes #729

Signed-off-by: Xavier Coulon [email protected]

@codecov
Copy link

codecov bot commented Jul 19, 2020

Codecov Report

Merging #734 into master will decrease coverage by 0.02%.
The diff coverage is 96.90%.

@@            Coverage Diff             @@
##           master     #734      +/-   ##
==========================================
- Coverage   85.00%   84.97%   -0.03%     
==========================================
  Files          75       76       +1     
  Lines        5194     5213      +19     
==========================================
+ Hits         4415     4430      +15     
- Misses        492      494       +2     
- Partials      287      289       +2     

Parsing special characters ('>', '<', '&') and also
'+' (for compatibility of output with Asciidoctor)

These special characters are stored in the new `SpecialCharacter`
type and can be converted into HTML entities in the HTML5
and XHTML5 backends. Other backends may decide to display
the values as-is.
This removes the introduction of HTML entities during
attribute substitutions (which would cause troubles for
future backends) and also, removes the need to
the `sanitized` type (an alias for `html.HTML`)

Fixes bytesparadise#729

Signed-off-by: Xavier Coulon <[email protected]>
@xcoulon xcoulon force-pushed the Issue729_parse_special_characters branch from 5961664 to b119698 Compare July 19, 2020 08:54
@xcoulon xcoulon merged commit 4824d20 into bytesparadise:master Jul 19, 2020
@xcoulon xcoulon deleted the Issue729_parse_special_characters branch July 19, 2020 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse special characters
1 participant