close tag of A span multi lines
See original GitHub issuePrettier 1.15.1 Playground link
--parser html
Input:
<div id="error_sample"><a href="/coop.html">aaaaa</a><a href="/coop.html">my close tag span multi line</a><a href="/coop.html">aaaaa</a></div>
<div id="ok_sample"><a href="/coop.html">aaaaa</a> <a href="/coop.html">has whitesapce around me, i'am ok</a> <a href="/coop.html">aaaaa</a></div>
<a href="/coop.html">this is a long long long long long long long long long long long line</a>
<div class="halo">this is a long long long long long long long long long long long line</div>
Output:
<div id="error_sample">
<a href="/coop.html">aaaaa</a
><a href="/coop.html">my close tag span multi line</a
><a href="/coop.html">aaaaa</a>
</div>
<div id="ok_sample">
<a href="/coop.html">aaaaa</a>
<a href="/coop.html">has whitesapce around me, i'am ok</a>
<a href="/coop.html">aaaaa</a>
</div>
<a href="/coop.html"
>this is a long long long long long long long long long long long line</a
>
<div class="halo">
this is a long long long long long long long long long long long line
</div>
Expected behavior: see the output above, ‘#ok_sample’
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Multiline span-behaving elements - css - Stack Overflow
I want to display a list of complex, but fixed-size multiline elements, assuming that they will wrap the ...
Read more >How can I wrap my text to span over multiple lines in order to ...
I need to create a version where the text is wrapped within the "fakeScreen" container and can span across multiple lines.
Read more >WebD2: Common HTML Tags - University of Washington
An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text...
Read more >HTML span Tag - GeeksforGeeks
The span tag is a paired tag means it has both open(<) and closing (>) tags, and it is mandatory to close the...
Read more >The Content Span element - HTML - MDN Web Docs
It should be used only when no other semantic element is appropriate. <span> is very much like a <div> element, but <div> is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hisland It’s because
<a>
is an inline tag, so if Prettier added whitespace to the HTML it would show up in your browser – see https://prettier.io/blog/2018/11/07/1.15.0.html#whitespace-sensitive-formatting for more detail@ikatyang : the option you suggested seems to resolve my problems with the closing tags:. –html-whitespace-sensitivity ignore (and I learned a lot about the spec of a closing ‘a’ tag and white-spacing too 😉) Thanks for your help! 😃