mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix issue with spaces dissapearing when highlights are created
Use the raw text when creating a highlight node instead of the escaped text. This means \n spaces will be preserved in the node and prevent spaces from being removed.
This commit is contained in:
parent
2190acc0e0
commit
e16fc81a2f
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue