Python: keep quoted named-arg values as single tokens in CodeTokenizer - #14461
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Conversation
A template like {{ plugin.function arg1='value with spaces' }} failed with
TemplateSyntaxError because the tokenizer never entered value mode for the
quote after name=: the space inside the quoted value ended the token early,
producing the invalid block key='value instead of a NamedArgBlock.
Enter VALUE mode when a quote directly follows the = of a named argument and
flush the token as a NamedArgBlock, matching how positional quoted values
with spaces already worked.
Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Manohar Paturi (ManoharPaturi)
requested a review
from a team
as a code owner
September 18, 2026 11:57
Manohar Paturi (ManoharPaturi)
had a problem deploying
to
github-app-auth
September 18, 2026 11:57 — with
GitHub Actions
Failure
Manohar Paturi (ManoharPaturi)
had a problem deploying
to
github-app-auth
September 18, 2026 11:57 — with
GitHub Actions
Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14460.
the tokenizer now carries a quote-aware state while scanning tokens so a quoted value stays one token even when it contains spaces, matching the ValBlock grammar. template tests for both quote styles fail on main and pass here.