You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
js-beautify leaves the following single HTML5 <aside> element untouched, as it should:
<aside><spanclass="foo">foo</span></aside>
If another inline element such as <span> is nested, it is expected that js-beautify should continue to leave the HTML touched, because nothing about the inline elements should cause newlines to be added:
There is no reason for such behavior; it is a bug. It can be verified merely by pasting and formatting in the main input field at http://jsbeautifier.org/ .
(Note that syntax highlighter on that page can't correctly show formatting colors for this simple sequence of elements, but that likely is a separate issue and may not relate to this bug.)
The text was updated successfully, but these errors were encountered:
The syntax highlight is provided by another product, but it is also not configured for html. If you want to file an issue for that as well, that'd be cool.
This not limited to html 5 or aside elements:
<!-- before --><p><spanclass="foo">foo <spanclass="bar">bar</span></span></p><!-- after --><p><spanclass="foo">foo <spanclass="bar">bar</span></span></p>
But interestingly:
<!-- before --><aside><pclass="foo">foo <spanclass="bar">bar</span></p></aside><pclass="foo"><spanclass="bar">bar</span></p><!-- after --><aside><pclass="foo">foo <spanclass="bar">bar</span></p></aside><pclass="foo"><spanclass="bar">bar</span></p>
I was going to say this is related to #841, but that second example shows that it is not. Definitely a bug.
This is the double span issue mentioned elsewhere. It's not actually spans fault. It's caused by unformatted tags not identifying nested tags of the same name. The outer <span> considers the first </span> to be it's closing tag. You can duplicate the problem by replacing span with output for instance.
js-beautify leaves the following single HTML5
<aside>
element untouched, as it should:If another inline element such as
<span>
is nested, it is expected that js-beautify should continue to leave the HTML touched, because nothing about the inline elements should cause newlines to be added:However js-beautify incorrectly adds a newline before the
</aside>
end-tag:There is no reason for such behavior; it is a bug. It can be verified merely by pasting and formatting in the main input field at http://jsbeautifier.org/ .
(Note that syntax highlighter on that page can't correctly show formatting colors for this simple sequence of elements, but that likely is a separate issue and may not relate to this bug.)
The text was updated successfully, but these errors were encountered: