angular-template-formatter
angular-template-formatter copied to clipboard
Do not split multiple spans
Newlines between spans is rendered as a whitespace:
rendered as "a b".
So i am not sure if the spans should be forced to multilines because you really HAVE to do something like:
a<span *ngIf="">b to be rendered as ab... Maybe we are able to workarround this by using ng-containers despite of spans, but... its awfull and not correct.
I agree. For example this:
My name is <span class="font-green">Jesus</span>.
is formatted as:
My name is
<span class="font-green">Jesus</span>
.
which creates unwanted HTML space between "Jesus" and "."
Using ng-container instead of span does the same. It is very common scenario that you need to have no space after some tag.
I'm happy to accept a pull request for this issue, if someone wants to try to fix it.
I am willing to do that in next weeks, when not so busy