<div id="replaceMe">
<pre>
This is a multiline fragment.
Used when you are writing a lot of text by hand
</pre>
</div>
but got:
<div id="replaceMe" class="">
<pre>This is a multiline fragment.
Used when you are writing a lot of text by hand
</pre>
</div>
The response from the server is:
event: datastar-fragment
id: 0
data: fragment
data: <div id="replaceMe">
data: <pre>
data: This is a multiline fragment.
data:
data: Used when you are writing a lot of text by hand
data: </pre>
data: </div>
data:
I found the following comment that mentioned the removal of empty lines:
I think something broke in the last updates, because in the Multiline-Line example not all line breaks are recovered in the DOM: https://data-star.dev/examples/multiline_fragments
I would expect:
but got:
The response from the server is:
I found the following comment that mentioned the removal of empty lines:
https://github.com/delaneyj/datastar/blob/74b637889de58d1ca6bc439710509a9acd15d870/packages/library/src/lib/external/fetch-event-source.ts#L314