Closed jeremenichelli closed 3 years ago
@jeremenichelli Do you by any chance have the axe browser extension installed? See details in #43. Try a extension free browser tab.
Oh my, that was it, can't believe I missed that thing. I thought I switched off everything to isolated the test case. Thanks a lot for jumping in @jouni-kantola
Great! I had already changed my setup's newlines before the axe issue was found.
eleventyConfig.addPlugin(syntaxHighlightPlugin, {
lineSeparator: "\n",
});
It works OK, but I'll change it back to default once https://github.com/dequelabs/axe-core/issues/2711 is closed. See below screenshots from Safari.
With \n
newlines:
With default newlines (looks as expected):
Yeah I pushed the same fix by the time I wrote this issue. Thanks again for the pointer, I'll follow that issue.
Not an issue of the plugin itself, but I noticed that Chrome removes
br
tags from a resulting code tag which was highlighted. Here's the exact same page, first on FIrefox and then on Chrome:Firefox
Chrome
This test page has no JavaScript or CSS.
Here's the reproduction case from above, if you want to run it locally:
test.zip
My advice here would be to move the default
lineSeparator
option to\n
and fire a warning if the user sets it to<br>
in the mean time, as the output of the package it's broken out of the box because of this.If we decide this is the way we want to go I'm more than happy to create a PR.