str.split(/\s+/) yields a leading empty element when the input starts with
whitespace, so that element was counted as a word and joined back into the
output: " Ground control to Major Tom." truncated to 3 words returned
" Ground control..." instead of "Ground control to...".
Ruby Liquid splits in awk mode, which discards leading whitespace but keeps
trailing whitespace, so trimStart matches it and trim would not.