_parseFilterArgs in src/evaluate.js applies .trim() to the parsed content of quoted filter arguments, stripping meaningful leading and trailing whitespace.
Reproduction:
<div state="{ items: ['x', 'y', 'z'] }">
<span bind="items | join:' - '"></span>
<!-- Expected: x - y - z -->
<!-- Actual: x-y-z -->
</div>
Root cause: Lines 1865 and 1872 of src/evaluate.js call current.trim() after the content has already been correctly extracted from between quote characters. The trim is appropriate for unquoted values (removing incidental HTML attribute whitespace) but incorrect for quoted values (destroying intentional whitespace).
Impact: Any filter argument with leading or trailing whitespace inside quotes is affected. This includes the documented join:', ' example in docs/md/filters.md, which promises a, b, c but actually produces a,b,c. Affects both the compiled path (_compileFilterSpec → _parseFilterArgs) and the interpreted path (_applyFilter → _parseFilterArgs).
Fix: Track whether the current argument was parsed from a quoted string. Skip trim() for quoted arguments; apply it only to unquoted values. Existing tests only cover interior spaces (__tests__/core.test.js:741), so a leading/trailing-whitespace case should be added.
_parseFilterArgsinsrc/evaluate.jsapplies.trim()to the parsed content of quoted filter arguments, stripping meaningful leading and trailing whitespace.Reproduction:
Root cause: Lines 1865 and 1872 of
src/evaluate.jscallcurrent.trim()after the content has already been correctly extracted from between quote characters. The trim is appropriate for unquoted values (removing incidental HTML attribute whitespace) but incorrect for quoted values (destroying intentional whitespace).Impact: Any filter argument with leading or trailing whitespace inside quotes is affected. This includes the documented
join:', 'example indocs/md/filters.md, which promisesa, b, cbut actually producesa,b,c. Affects both the compiled path (_compileFilterSpec→_parseFilterArgs) and the interpreted path (_applyFilter→_parseFilterArgs).Fix: Track whether the current argument was parsed from a quoted string. Skip
trim()for quoted arguments; apply it only to unquoted values. Existing tests only cover interior spaces (__tests__/core.test.js:741), so a leading/trailing-whitespace case should be added.