markup_fmt icon indicating copy to clipboard operation
markup_fmt copied to clipboard

Unwanted line breaks between consecutive inline elements

Open UnknownPlatypus opened this issue 1 year ago • 1 comments
trafficstars

Hi !

It seems like multiple inline elements on the same line force wrapping between each one of them.

-<p>Lorem <b>ipsum</b> <b>ipsum</b> <b>ipsum</b> dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue </p>
+<p>
+  Lorem <b>ipsum</b>
+  <b>ipsum</b>
+  <b>ipsum</b> dolor sit amet, consectetur adipiscing elit. Fusce cursus massa
+  vel augue
+</p>

I would expect for them to stay on the same line until the line_width is exceeded ? Something like that:

-<p>Lorem <b>ipsum</b> <b>ipsum</b> <b>ipsum</b> dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue </p>
+<p>
+  Lorem <b>ipsum</b> <b>ipsum</b> <b>ipsum</b> dolor sit amet, consectetur
+  adipiscing elit. Fusce cursus massa vel augue
+</p>

Is this expected behavior ?

Thank again for this tool, and let me know if you need more details

UnknownPlatypus avatar Nov 24 '24 23:11 UnknownPlatypus

This isn't expected, and the latter example you gave should be preferred. But, for the example below, they shouldn't stay on the same line:

<p>
  <div>a</div>
  <div>b</div>
</p>

g-plane avatar Nov 25 '24 02:11 g-plane