prettyhtml
prettyhtml copied to clipboard
Whitespace is being added around spans
🐛 Bug Report
white space is being added in between spans with no discernible way to stop it
To Reproduce
Steps to reproduce the behavior:
Paste your markup here:
<h1>emergen<span class="t">t</span><wbr /><span
class="dot"
aria-hidden
>⋅</span>seas
</h1>
Expected behavior
the t is part of the word 'emergent', so if it needs to not have a space in front of it. The formatting should not change the resulting markup.
Current Results:
<h1>
emergen
<span class="t">t</span>
<wbr />
<span class="dot" aria-hidden>⋅</span>seas
</h1>
We are getting spaces inserted around the t, the <wbr> tag
Your Environment
https://prettyhtml.netlify.com/
Hi @thedamon would you like to send a PR?
I don't think i have the expertise or time to look at this within a reasonable timeframe. I suspect there may be some complications involved in determining exactly how to compute line wrapping without changing the whitespace
My time is also very limited and it has currently no priority. Feel free to ask for a starting point otherwise go with prettier as formatting tool.
Prettier team refuses to let us wrap attributes 1 per line so prettyhtml is my friend 😍
I could see where this would get hard to want to maintain with prettier doing much the same thing. If you know roughly where I might look I'd be curious to have a look and maaaaybe come up with something.
@thedamon hello. Isn't that a solution to your problem?
good workaround yes, thank you. ideally a formatter shouldn’t alter the underlying code, but that’s a good escape hatch.
Hello, I don't know why this library is introduced into the Vue project. With this API, the project will not run. They say we can't find the third party. Can you help me? Thank you very much.