-
Notifications
You must be signed in to change notification settings - Fork 25
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
source highlighter should get unadulterated string #721
Comments
I think the conversion of certain characters to HTML entities is taking place too soon. |
We're getting the content post-processed -- i.e. after renderElements(). My guess is that this also clobbers callouts - but I'm not 100% certain yet. |
Definitely callouts were not functional with syntax highlighting. Fixing this will fix that, although the fix is a bit tricky. PR incoming. |
gdamore
added a commit
to gdamore/libasciidoc
that referenced
this issue
Jul 13, 2020
Ths fix for this involved some refactoring of the highlighting work to separate out the calloouts (we embed them using reserved Unicode so that we can find them again and replace them inline). Chroma automatically escapes the code for HTML safetly already, so we defer to it's rules, when we use it. We still have to do this ourselves when not using Chroma. Fixes bytesparadise#721
xcoulon
pushed a commit
that referenced
this issue
Jul 14, 2020
This fix for this involved some refactoring of the highlighting work to separate out the callouts (we embed them using reserved Unicode so that we can find them again and replace them inline). Chroma automatically escapes the code for HTML safely already, so we defer to it's rules, when we use it. We still have to do this ourselves when not using Chroma. Fixes #721
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The content passed to the source highlighter code winds up having entities injected, which confused the output. So when I pass this:
I get this:
The text was updated successfully, but these errors were encountered: