Do not include whitespace as segment

context-store
Alfred Melch 5 years ago
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…
Cancel
Save