mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add space to the end of sentence
This commit is contained in:
parent
73de22f678
commit
811cec6c93
1 changed files with 4 additions and 0 deletions
|
|
@ -313,6 +313,10 @@ const textToUtterances = ({
|
|||
// use nlp lib to detect sentences and
|
||||
// avoid splitting words and sentences
|
||||
sentences.forEach((sentence, i) => {
|
||||
if (i < sentences.length - 1) {
|
||||
// add space to the end of sentence
|
||||
sentence += ' '
|
||||
}
|
||||
const nextText = currentText + sentence
|
||||
if (nextText.length > MAX_CHARS) {
|
||||
if (currentText.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue