Do not include whitespace as segment

This commit is contained in:
Alfred Melch 2019-12-14 19:25:47 +01:00
parent 29c7aa9cf5
commit 22c34ce484

View File

@ -24,6 +24,8 @@ export const TextOutput = () => {
const isSentenceStart = sentences.includes(wordBeginning)
return (
<>
{isWordStart && ' '}
<span
key={idx}
className={classNames({
@ -31,9 +33,9 @@ export const TextOutput = () => {
[styles.sentenceBeginning]: isSentenceStart
})}
>
{isWordStart && ' '}
{segment}
</span>
</>
)
})}
</div>