Do not include whitespace as segment
This commit is contained in:
parent
29c7aa9cf5
commit
22c34ce484
@ -24,16 +24,18 @@ export const TextOutput = () => {
|
|||||||
const isSentenceStart = sentences.includes(wordBeginning)
|
const isSentenceStart = sentences.includes(wordBeginning)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<>
|
||||||
key={idx}
|
|
||||||
className={classNames({
|
|
||||||
[styles.current]: isCurrent,
|
|
||||||
[styles.sentenceBeginning]: isSentenceStart
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{isWordStart && ' '}
|
{isWordStart && ' '}
|
||||||
{segment}
|
<span
|
||||||
</span>
|
key={idx}
|
||||||
|
className={classNames({
|
||||||
|
[styles.current]: isCurrent,
|
||||||
|
[styles.sentenceBeginning]: isSentenceStart
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{segment}
|
||||||
|
</span>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user