Firefox add-on prevents line-breaks in code highlighted with PrismJS
See original GitHub issueI don’t know how, but right now using Firefox Nightly (72) and consulting technical contents with code blocks (eg HTMHell), PrimsJS is unable to wrap content for line-breaks (trying to add a <span class="highlight-line">
for each line, but not throwing any error nor message…).
After double checking every settings and add-ons, it seems that this is prevented by the aXe webextension: with my current profile and every settings, simply disabling aXe made PrismJS wrapping correctly again…
I have no idea what’s doing this, but this sounds very curious!
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Prism.js
Automatically loads the needed languages to highlight the code blocks. Keep Markup. Prevents custom markup from being dropped out during highlighting. Command ...
Read more >PrismJS no line breaks - javascript - Stack Overflow
Not sure if anyone has come across this. I'm using PrismJS syntax highlighter to highlight code. Application is ...
Read more >In Firefox 30 (Windows) "Style Editor" is adding breakes ...
Hello, After upgrading Firefox to v30 Style Editor started adding line breaks in CSS files. It makes working with CSS files very annoying....
Read more >Prism
Extensible Define new languages or extend existing ones. Add new features thanks to Prism's plugin architecture. Easy styling All styling is done through...
Read more >Prism Documentation - CodePen
var Prism = require('prismjs'); // The code snippet you want to highlight, ... Show invisible characters like tabs, line breaks etc (requires plugin) ......
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
I’m still seeing this happening in Chrome 86 with v4.6.1 of the extension.
For example, on https://www.11ty.dev/ I see
If I disable the axe extension, I see:
It’s also stomping classes in other syntax-highlighted code blocks, removing the styling – for example on https://design-system.service.gov.uk/get-started/extending-and-modifying-components/ the extension replaces:
with:
We’re currently tracking an open issue here: #2686