Skip to content

🪲 Fix quoted list highlighting - #6632

Draft
vamshikrishnaramasamy wants to merge 1 commit into
hedyorg:mainfrom
vamshikrishnaramasamy:agent/fix-quoted-list-highlighting
Draft

🪲 Fix quoted list highlighting#6632
vamshikrishnaramasamy wants to merge 1 commit into
hedyorg:mainfrom
vamshikrishnaramasamy:agent/fix-quoted-list-highlighting

Conversation

@vamshikrishnaramasamy

Copy link
Copy Markdown
Contributor

Quoted list values now parse consistently in levels 11 and 12. Includes a regression test and regenerated parsers.

Fixes #6623


// Commas in every language are allowed
AssignList { Text (is+ | Op<"=">) (Text+ | Number ) ~ambig (Op<',' | '،' | ',' | '、' > (Text+ | Number ))+ }
AssignList { Text (is+ | Op<"=">) (String | Text+ | Number ) ~ambig (Op<',' | '،' | ',' | '、' > (String | Text+ | Number ))+ }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hello, @vamshikrishnaramasamy!

Thank you for the PR, but we are not going to move forward with this solution. If you look at the grammars, strings are not required for assigning text to a variable from up until level 13. Therefore, we dont need to add a String node to the AssignList rule.

What we actually need to do is the opposite and maybe you are interested in fixing this: stop highlighting strings on assignments and other places where they are not allowed.

jpelay added a commit that referenced this pull request Aug 13, 2026
## Problem

Every fork pull request has been failing the `updatefiles` check within
a few seconds, before any code runs:

> Refusing to check out fork pull request code from a
`pull_request_target` workflow.

`actions/checkout@v6` added a default refusal to check out fork code
from `pull_request_target`, guarding against ["pwn
request"](https://gh.io/securely-using-pull_request_target) attacks. v6
landed in this workflow on 2026-05-31 (#6579), and fork PRs have failed
ever since — same-repo branches such as Dependabot's are unaffected,
which is why this looked intermittent.

Because `postupdate` has `needs: [updatefiles]`, it is skipped too, so
**the Weblate snippet tests (`doit run _autopr_weblate`) have not run on
any translation PR since May.** Confirmed on #6643 (Weblate) and #6632
(an unrelated fork PR), which fail identically.

## Fix

Set `allow-unsafe-pr-checkout: true` on both checkout steps.

Opting in explicitly is preferred over pinning back to v5, because this
workflow already implements exactly the mitigation the guard asks for.
The job split is deliberate and predates this change:

- **`updatefiles`** runs the untrusted code, declares `permissions:
contents: read`, and receives no secrets.
- **`postupdate`** holds the write token but executes no fork code — it
only checks out the branch so the commit lands on it, overlays the
uploaded artifact, and commits.

I added comments at both sites recording that reasoning, including a
note on `postupdate` that build or test steps must not be added to it,
since that is the property making the opt-in acceptable there.

## Scope

Only this workflow is affected. The other three `pull_request_target`
workflows (`unlock-weblate.yml`, `codesee-arch-diagram.yml`,
`autoapprove.yml`) have no checkout step.

## Note

This does not address GitHub's separate repository setting requiring
approval before workflows run for outside contributors — that lives in
Settings and cannot be fixed here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: jpelay <jpelay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress
Status: Review for relevance

Development

Successfully merging this pull request may close these issues.

🪲Syntax highlighting with quotes in lists not consistent

2 participants