You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by danjelalura July 24, 2024
Hello community,
This piece of text:
foo\
bar
and this piece of text:
foo
bar
are represented differently in the DOM when parsed.
In the first case, a backslash is used as a hard line break and in the second case 2 spaces are used as a hard line break. Even though both of these representations of a hard line break are shown as HardLineBreak, for the first case, the spaces at the beginning of the next line are not ignored. The offsets however, disregard the whitespaces.
I am having a hard time understanding why this happens. This could potentially lead to issues when making use of the information provided by the above representation.
Thank you for your help!
The text was updated successfully, but these errors were encountered:
Discussed in #618
Originally posted by danjelalura July 24, 2024
Hello community,
This piece of text:
and this piece of text:
are represented differently in the DOM when parsed.
In the first case, a backslash is used as a hard line break and in the second case 2 spaces are used as a hard line break. Even though both of these representations of a hard line break are shown as HardLineBreak, for the first case, the spaces at the beginning of the next line are not ignored. The offsets however, disregard the whitespaces.
First case:
Second case:
I am having a hard time understanding why this happens. This could potentially lead to issues when making use of the information provided by the above representation.
Thank you for your help!
The text was updated successfully, but these errors were encountered: