mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix typo
This commit is contained in:
parent
e3d8fae6c5
commit
175b82485f
1 changed files with 7 additions and 7 deletions
|
|
@ -354,22 +354,22 @@ const fillHighlight = ({
|
|||
} = textNodes[startingTextNodeIndex]
|
||||
const text = node.nodeValue || ''
|
||||
|
||||
const textBeforeHighlightLenght = highlightTextStart - startIndex
|
||||
const textAfterHighlightLenght = highlightTextEnd - startIndex
|
||||
const textBeforeHighlightLength = highlightTextStart - startIndex
|
||||
const textAfterHighlightLength = highlightTextEnd - startIndex
|
||||
|
||||
const textPartsToHighlight = []
|
||||
textBeforeHighlightLenght > 0 &&
|
||||
textBeforeHighlightLength > 0 &&
|
||||
textPartsToHighlight.push({
|
||||
text: text.substring(0, textBeforeHighlightLenght),
|
||||
text: text.substring(0, textBeforeHighlightLength),
|
||||
highlight: false,
|
||||
})
|
||||
textPartsToHighlight.push({
|
||||
text: text.substring(textBeforeHighlightLenght, textAfterHighlightLenght),
|
||||
text: text.substring(textBeforeHighlightLength, textAfterHighlightLength),
|
||||
highlight: true,
|
||||
})
|
||||
textAfterHighlightLenght <= text.length &&
|
||||
textAfterHighlightLength <= text.length &&
|
||||
textPartsToHighlight.push({
|
||||
text: text.substring(textAfterHighlightLenght),
|
||||
text: text.substring(textAfterHighlightLength),
|
||||
highlight: false,
|
||||
})
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue