Avoid persian/arabic characters join within two tags

56 Views Asked by At

I have two same html code with diffrent result.
Because of the gulp compressing html files and removing extra break lines my codes looks like first block but I dont want my word join together.

<p><span>آقای</span><span>اکبری</span></p>
<!-- Wrong: آقایاکبری -->

<p><span style="margin: 0 5px;">آقای</span><span style="margin: 0 5px;">اکبری</span></p>
<!-- Wrong: آقایـ ـاکبری -->

<p>
  <span>آقای</span>
  <span>اکبری</span>
</p>
<!-- Correct: آقای اکبری -->

1

There are 1 best solutions below

1
Pufferfish101007 On

Using an entity code will stop your compressor from removing whitespace as it isn't whitespace. &nbsp is a non-breaking space.

<p><span>آقای</span>&nbsp;<span>اکبری</span></p>