Hi, in my .html file, the following happens:
Expected result
html
<p class="quote">
<strong>"Lorem ipsum dolor sit amet consecetur lorem ipsum dolor sit
consecetur."</strong>
</p>
On save error
````html
"Lorem ipsum dolor sit amet consecetur lorem ipsum dolor sit
consecetur."
</p>
````
Note how the tags are split up into new lines.
This is not only <strong>. Seems that if any tag has contents text that is longer than wrap-chars, the closing angle-bracket of the opening tag is always moved to the next line.
FWIW, adding a space after the opening tag will work around this issue. So, this will wrap correctly:
<strong> "Lorem ipsum dolor sit amet consecetur lorem ipsum dolor sit
consecetur."</strong>
(Note the added space after <strong>.)
Looking for a soultion to this has been driving me crazy. Any other suggestions besides @alenl 's suggestion to add leading spaces? His suggestion is not working for me in all cases, like <div> and <img> tags with no content text, though it does not seem to happen at all with <p> or <li> tags even if their content text gets wrapped
html is new in prettier. Things are changing.
You can play with a setting _htmlWhitespaceSensitivity_. Use with care as it can change the meaning of your whitspace.
There is nothing more we can do in this extension about that.
Breaking line after tag solve to me:
<strong>
text
</strong>
There is a way to configure Prettier to do this automatically?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
This is not only
<strong>. Seems that if any tag has contents text that is longer than wrap-chars, the closing angle-bracket of the opening tag is always moved to the next line.FWIW, adding a space after the opening tag will work around this issue. So, this will wrap correctly:
(Note the added space after
<strong>.)