private static void flushCurrentWord( StringBuilder currentWords, List<Word> formattedWords, boolean cutWhitespace ) {
        if( currentWords.length() > 0 ) {
            if( cutWhitespace && currentWords.charAt( currentWords.length() - 1 ) == ' ' ) {
                currentWords.setLength( currentWords.length() - 1 );
            }
            formattedWords.add( new Word( currentWords.toString() ) );
            currentWords.setLength( 0 );
        }
    }
Appends the accumulated words to the resulting words. Trailing whitespace is removed because of the
postprocessing that inserts custom whitespace

@param currentWords is the {@link StringBuilder} of the accumulated words
@param formattedWords is the list that is being appended to
jgiven-core/src/main/java/com/tngtech/jgiven/report/model/StepFormatter.java