Files
liquidjs/test
KBSandGitHub 65e200e22d fix(truncatewords): ignore leading whitespace when counting words (#954)
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.
2026-09-20 20:06:10 +08:00
..
2026-04-19 23:41:35 +08:00