mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-20 06:50:47 -07:00
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.