diff --git a/packages/web/lib/highlights/highlightGenerator.ts b/packages/web/lib/highlights/highlightGenerator.ts index 40f6d7046..0175d717b 100644 --- a/packages/web/lib/highlights/highlightGenerator.ts +++ b/packages/web/lib/highlights/highlightGenerator.ts @@ -126,7 +126,7 @@ export function makeHighlightNodeAttributes( // If we are not in preformatted text, prevent hardcoded \n, // we'll create new-lines based on the startsParagraph data const text = isPre ? rawText : rawText.replace(/\n/g, '') - const newTextNode = document.createTextNode(text) + const newTextNode = document.createTextNode(rawText) if (!highlight) { return parentNode?.insertBefore(newTextNode, nextSibling)