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

maxLineLength will split after <pre><code> element #118

Open
bmarwell opened this issue Mar 17, 2022 · 1 comment
Open

maxLineLength will split after <pre><code> element #118

bmarwell opened this issue Mar 17, 2022 · 1 comment

Comments

@bmarwell
Copy link

bmarwell commented Mar 17, 2022

Hi,

maxLineLength will split after the pre code elements:

<pre class="highlight highlightjs"><code class="hljs language-shell" data-lang="shell">dig +nostats google.de

resulting into:

<--long line etc etc etc --><pre class="highlight highlightjs"><code class="hljs language-shell" data-lang="shell">
dig +nostats google.de

This on the other hand will add an extra whitespace into the code. If combined with a line enumerator, the line #1 will be empty and the code starts at line two.

@carlosjeurissen
Copy link

carlosjeurissen commented Nov 3, 2023

@bmarwell ran into the same issue for one of my projects. What seems to work is setting the noNewlinesBeforeTagClose option to true.

Edit: This does not seem to work either.

My related issue: with maxLineLength and the following snippet: <title id="ref-something">Something, https://github.com/terser/html-minifier-terser/ can put a linebreak in between the opening tag and the text, resulting in whitespace before Something which leads to layout issues and other bugs.

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