mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use paragraph as anchor
This commit is contained in:
parent
ff6e84c401
commit
85e39dc9f1
1 changed files with 3 additions and 1 deletions
|
|
@ -290,10 +290,12 @@ export const htmlToSpeechFile = (
|
|||
const node = parsedNodes[i - 2]
|
||||
|
||||
if (TOP_LEVEL_TAGS.includes(node.nodeName) || hasSignificantText(node)) {
|
||||
// use paragraph as anchor
|
||||
const idx = i.toString()
|
||||
i = emitElement(textItems, node, true)
|
||||
const utterance = htmlToUtterance(
|
||||
tokenizer,
|
||||
i.toString(),
|
||||
idx,
|
||||
textItems,
|
||||
wordOffset,
|
||||
node.nodeName === 'BLOCKQUOTE' ? options.secondaryVoice : undefined
|
||||
|
|
|
|||
Loading…
Reference in a new issue