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

collapseWhitespace remove the space around the <output> tag #1070

Open
epexa opened this issue Aug 10, 2020 · 0 comments · May be fixed by #1071
Open

collapseWhitespace remove the space around the <output> tag #1070

epexa opened this issue Aug 10, 2020 · 0 comments · May be fixed by #1071

Comments

@epexa
Copy link

epexa commented Aug 10, 2020

how to reproduce:

  1. create example html file "input.html":
<!-- It's not ok! Removes space before and after number 23 -->
<p>Before output tag text <output>23</output> after output tag text.</p>
<!-- It's ok -->
<p>Before b tag text <b>23</b> after b tag text.</p>
  1. run with collapseWhitespace parameter
    npx html-minifier --collapse-whitespace input.html -o output.html

html result "output.html":

<!-- It's not ok! Removes space before and after number 23 --><p>Before output tag text<output>23</output>after output tag text.</p><!-- It's ok --><p>Before b tag text <b>23</b> after b tag text.</p>

reason: the "output" is not a inline tag, but is often used as a inline (for javascript).

epexa added a commit to epexa/html-minifier that referenced this issue Aug 10, 2020
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

Successfully merging a pull request may close this issue.

1 participant