Code highlighting not working when & in html code
See original GitHub issueDescribe the problem
I inserted some html code blocks in my markdown files.
I expected colored codes, but there were some code blocks were full of black letters.
After trial and error, I found out that this was due to &
.
It seems it’s because &
is used for html entities. 🤔
If I use &
, the codes are highlighted but the color stands out too much… 🥺
Is there any other way but to replace the character?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
HTML syntax not highlighting correctly - Stack Overflow
I solved the issue. I realised that once when I was meddling with something I added by accident a single character to the...
Read more >Embedded Syntax Highlighting in HTML files not working
Currently, it seems that only the HTML highlighting is used independent of what other language may be embedded, i.e. css or js.
Read more >Javascript syntax highlighting it not working
I have an .html file which is part of a large project, and in the middle of the file, syntax highlighting just flat...
Read more >HTML formatting inside code blocks doesn't work if syntax ...
I have plenty of old answers where I used <pre><code> to format code, with HTML tags such as <b> or <strike> inside such...
Read more >Prism
PrismJS Tutorial | Implement Prism in HTML and React; Code syntax highlighting in Pug with :highlight and :markdown filters using pug-loader and Prism.js....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
is that with the &? because that is definitely not allowed in HTML
Oh, I see. Thank you!