Skip to content

Parse empty filter argument lists - #1295

Merged
charlespwd merged 1 commit into
mainfrom
cp-liquid-html-parser-argument-fixes
Sep 11, 2026
Merged

charlespwd merged 1 commit into
mainfrom
cp-liquid-html-parser-argument-fixes

Conversation

@charlespwd

@charlespwd charlespwd commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

What are you adding in this PR?

Parse a filter colon followed by the end of markup or another filter as an empty argument list.

These forms now produce a structured LiquidVariable with an empty args array, and the filter range includes the colon:

{{ 'key' | t: }}
{{ 'key' | t: | escape }}

Malformed arguments such as {{ 'key' | t: @ }} continue to use string markup. Tests cover strict Liquid and LiquidHTML parsing, tolerant parsing, filter ranges, and echo tags.

What's next? Any followup issues?

None.

Tophatting

Run CI=1 pnpm test from the repository root.

  • Screenshots are not applicable to parser-only changes.

Before you deploy

  • I included a patch bump changeset.

@charlespwd
charlespwd marked this pull request as ready for review September 11, 2026 13:27
@charlespwd
charlespwd requested a review from a team as a code owner September 11, 2026 13:27
@charlespwd
charlespwd marked this pull request as draft September 11, 2026 14:23
@charlespwd
charlespwd force-pushed the cp-liquid-html-parser-argument-fixes branch from f308611 to 983f25e Compare September 11, 2026 14:32
@charlespwd charlespwd changed the title Fix liquid-html-parser argument edge cases Parse empty filter argument lists Sep 11, 2026
@charlespwd
charlespwd marked this pull request as ready for review September 11, 2026 15:02

@karreiro karreiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @charlespwd!

@charlespwd
charlespwd merged commit 7418526 into main Sep 11, 2026
8 checks passed
@charlespwd
charlespwd deleted the cp-liquid-html-parser-argument-fixes branch September 11, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants