11ty / eleventy-plugin-syntaxhighlight

A pack of Eleventy plugins for syntax highlighting in Markdown, Liquid, and Nunjucks templates.
https://www.11ty.dev/docs/plugins/syntaxhighlight/
MIT License
130 stars 32 forks source link

Major issue with syntax-highlight plugin for multi-line code blocks #43

Closed tannerdolby closed 3 years ago

tannerdolby commented 3 years ago

@zachleat Everything that is being highlighted by eleventy-plugin-syntaxhighlight on 11ty.dev has some issues with the styling.

Each of the multi-line code blocks are formatted into a single line. This issue is probably happening for everyone using the plugin, as I first noticed it on my own website.

Also, all of the <pre> tags have an extra space at the beginning of the class declaration like this (which I don't think matters but just wanted to note everything I saw)

<pre class=" language-html">

Screenshot of issue:

Screen Shot 2020-12-12 at 1 26 21 PM

The above code snippets are supposed to be multi line but obviously they are not.

I tried to tweak the CSS in my prism.css file locally to get the multi-line format to come back but I'm still trying to figure out where exactly the problem is at.

zachleat commented 3 years ago

I had someone else mention this to me earlier this week but it worked fine with an incognito window, can you rule out an extension?

Ryuno-Ki commented 3 years ago

Looking at https://www.11ty.dev/docs/plugins/syntaxhighlight/ I cannot confirm:

11ty-screenshot

tannerdolby commented 3 years ago

Yep your right! It's a chrome plugin that was causing the issue. After disabling axe - Web Accessibility Testing from my chrome extensions, the code blocks are formatted correctly!

That's odd that the axe plugin could have this much destructive behavior, but I guess just as Lighthouse audits are affected by browser plugins, the syntaxhighlight is too.

tannerdolby commented 3 years ago

@Ryuno-Ki You must not have any browser plugins enabled. Or if you do, could you list them? I'm curious.

Ryuno-Ki commented 3 years ago

Perhaps you should inform @dequelabs (e.g. https://github.com/dequelabs/axe-core) about this?

I've got plenty of addons in my setup. axe is not among them, though.

tannerdolby commented 3 years ago

Yeah, I think that would probably be best. I will submit an issue and inform @dequelabs of this.

Ryuno-Ki commented 3 years ago

Since you've asked:

enabled-webext

Ryuno-Ki commented 3 years ago

Please close this issue, since the problem was not caused by 11ty :-)

tannerdolby commented 3 years ago

@Ryuno-Ki Closed! Thanks for your input.

zachleat commented 3 years ago

Appreciate the heads up though Tanner! I wasn't able to investigate to narrow it down to a specific extension so that is helpful 👍🏻👍🏻

tannerdolby commented 3 years ago

No problem Zach!

If I obtain any relevant information or details from the issue I open in axe-core, I will update you in case that info could be helpful.

5t3ph commented 3 years ago

Confirmed as aXe by myself and also @bjankord

Can be temp resolved per-user by updating your Chrome extension settings for Site Access to "on click" as shown in the screenshot:

chrome extension settings for aXe

lonekorean commented 3 years ago

Also confirmed, happens when I install "axe - Web Accessibility Testing".

@tannerdolby can you link the issue you opened? I can't seem to find it.

tannerdolby commented 3 years ago

@lonekorean This issue (#877) is the one I opened! It's now been closed since we have determined that the problematic browser plugin is aXe - Web Accessibility Testing

lonekorean commented 3 years ago

@tannerdolby oh sorry! I thought you had opened one in the axe-core repo: https://github.com/dequelabs/axe-core/issues

If not, maybe we should open one there? I'm happy to do it, but you have first dibs. :)

tannerdolby commented 3 years ago

Ah, yes. Thanks for the reminder. Here is the issue opened in dequelabs/axe-core dequelabs/axe-core/issues/2711

zachleat commented 3 years ago

Moved to eleventy-plugin-syntaxhighlight repo