Commit Graph
2 Commits
Author SHA1 Message Date
KBSandGitHub e68514f066 fix(date): compute %C and %y from the numeric year (#961)
Both were sliced from the year string, so years with other than four
digits gave the wrong century and two-digit year, and %y was a string
that the - and _ flags could not unpad. Compute them arithmetically and
pad them to two digits, matching Ruby's strftime.
2026-09-30 00:47:25 +08:00
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