From 22c34ce4846b64eb289f2159f7f32d9c33140140 Mon Sep 17 00:00:00 2001 From: Alfred Melch Date: Sat, 14 Dec 2019 19:25:47 +0100 Subject: [PATCH] Do not include whitespace as segment --- src/components/TextOutput.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/TextOutput.js b/src/components/TextOutput.js index 97fd54e..4f7cd83 100644 --- a/src/components/TextOutput.js +++ b/src/components/TextOutput.js @@ -24,16 +24,18 @@ export const TextOutput = () => { const isSentenceStart = sentences.includes(wordBeginning) return ( - + <> {isWordStart && ' '} - {segment} - + + {segment} + + ) })}