angular-template-formatter icon indicating copy to clipboard operation
angular-template-formatter copied to clipboard

Do not split multiple spans

Open montella1507 opened this issue 6 years ago • 3 comments

Newlines between spans is rendered as a whitespace: a b

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.

montella1507 avatar Jun 12 '18 10:06 montella1507

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.

kunajs avatar Jul 20 '18 06:07 kunajs

I'm happy to accept a pull request for this issue, if someone wants to try to fix it.

stringham avatar Jul 21 '18 14:07 stringham

I am willing to do that in next weeks, when not so busy

montella1507 avatar Aug 01 '18 13:08 montella1507