Skip to content
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

[Autoloader + Line Highlight] Extra space at the end #1101

Closed
dlecina opened this issue Feb 12, 2017 · 1 comment
Closed

[Autoloader + Line Highlight] Extra space at the end #1101

dlecina opened this issue Feb 12, 2017 · 1 comment

Comments

@dlecina
Copy link

dlecina commented Feb 12, 2017

There seems to be some sort of compatibility issue between Autoloader and Line Highlight. Here's what my code looked like before using Autoloader:

Before

Here's what it looks like when using it:

After

No extra space is added when I don't use Line highlight:

No line highlight

I took a look at the HTML after the Prism pass and it looks like extra whitespace is being added for no clear reason (i.e. this is not a CSS issue).

Thank you for your time.

zeitgeist87 added a commit that referenced this issue Feb 13, 2017
The tags used by the line-highlight plugin are appended to the <code>
tag. This causes problems with the autoloader plugin, because the
tags contain whitespace and therefore change the content of the <code>
tag.

This patch fixes the issue #1101, by removing any line-highlight tags
with the `before-sanity-check` hook.
@zeitgeist87
Copy link
Collaborator

Thank you for reporting this. It should be fixed now 79b723d

The problem was, that line-highlight appends a few tags to the <code> tag. These tags contain whitespace, which is later picked up by the autoloader plugin with the textContent property and interpreted as normal source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants