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

.w class conflicts with code whitespace #35

Open
apple1417 opened this issue May 16, 2023 · 1 comment
Open

.w class conflicts with code whitespace #35

apple1417 opened this issue May 16, 2023 · 1 comment

Comments

@apple1417
Copy link

When formatting some languages, rouge will insert explicit whitespace spans, which use the exact same class as that on the main page body. This gives them a bunch of weird extra padding.

```json
no space
 1 space
  2 space
   3 space
    4 space
```

Becomes

<pre><span class="err">no</span><span class="w"> </span><span class="err">space</span><span class="w">
 </span><span class="mi">1</span><span class="w"> </span><span class="err">space</span><span class="w">
  </span><span class="mi">2</span><span class="w"> </span><span class="err">space</span><span class="w">
   </span><span class="mi">3</span><span class="w"> </span><span class="err">space</span><span class="w">
    </span><span class="mi">4</span><span class="w"> </span><span class="err">space</span><span class="w">
</span></pre>

 
The workaround I've got for now is:

.highlighter-rouge .w {
    max-width: unset;
    margin: unset;
    padding: unset;
}
@abhinavs
Copy link
Owner

Thank you, can you please create a pull requests with these changes. I will merge them

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