-
Notifications
You must be signed in to change notification settings - Fork 24
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
Don't always insert spaces around inline tags? #16
Comments
Another example:
I did a quick test in Chrome and it is not adding spaces between inline elements. Is there any case in which is clear that spaces should be added? |
@ivanprado please see #2 and #1, there are some examples from the wild where adding spaces makes sense. |
If we had information about actual CSS properties of the elements, we could do a better job, but that would probably be out of scope of html-text |
I see. My experience with article bodies is that is a better policy not to add any spacing when removing |
Example input:
<div><strong>fo</strong>o</div><div>bar</div>
. Current output:'fo o\nbar'
, while desired output is'foo\nbar'
.At the same time, in the changelog I find this:
So it's not entirely clear if we should always avoid adding spaces around all inline tags. Maybe we could start with not adding them around tags such as
strong
,em
, etc.Also note that more common usage such as
<div><strong>foo</span>, next</div>
is handled correctly regardless:foo, next
.The text was updated successfully, but these errors were encountered: