shama / yo-yoify

Transform choo, yo-yo or bel template strings into pure and fast document calls
111 stars 17 forks source link

strip empty text nodes #45

Closed yoshuawuyts closed 7 years ago

yoshuawuyts commented 7 years ago

Makes it so that random whitespace does not create empty text nodes

See Also

yoshuawuyts commented 7 years ago

v3.7.3 :sparkles:

mantoni commented 7 years ago

This screws up my layouts @yoshuawuyts

Consider this:

<em>Yes</em>
<span>yo</span>

This should render as "Yes yo". With this change it becomes "Yesyo".

You can replace multiple whitespace characters with a single blank though. That'd be fine.

arturi commented 7 years ago

Yeah, we also ran into this with Uppy:

<div>
  <strong>${this.i18n('chooseFile')}</strong> <span class="UppyDragDrop-dragText">${this.i18n('orDragDrop')}</span>
</div>

Space between strong and span gets removed :(