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