feat: support non-ascii characters in for/each title placeholders - #10773
Merged
Merged
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
k-yle
commented
Jul 14, 2026
k-yle
force-pushed
the
kh/no-ascii-variables
branch
from
July 15, 2026 10:30
e98ee9a to
2a6e5fa
Compare
for/each title placeholders
hi-ogawa
approved these changes
Jul 16, 2026
Collaborator
There was a problem hiding this comment.
Looks good to me.
I've let agents do some adversarial edge cases and it surfaced interesting case. Some looks technically breaking change-ish, but probably fine (we land this in next v5 anyways).
| Placeholder | Before: \w |
After: \p{ID_Continue} |
|---|---|---|
$对象.结果 |
No match; remains literal | row["对象"]["结果"] |
$a.结果 |
Captures a. → row.a[""] + "结果" |
row.a["结果"] |
$𐐀 |
No match | row["𐐀"] |
$é |
No match | row["é"] |
$é |
Captures e → row.e + "\u0301" |
row["e\u0301"] |
$fooé |
Captures foo → row.foo + "é" |
row["fooé"] |
$ab |
Captures a → row.a + "\u200Cb" |
row["a\u200Cb"] |
$a·b |
Captures a → row.a + "·b" |
row["a·b"] |
$abc |
No match | row["abc"] |
$́foo |
No match | row["\u0301foo"] |
$foo-bar |
row.foo + "-bar" |
Unchanged |
$💡 |
Remains literal | Unchanged |
$.foo |
row[""]["foo"] |
Unchanged |
$foo..bar |
row.foo[""].bar |
Unchanged |
$0 |
items[0] |
Unchanged |
Also side note, it looks like people normally use it like [$_\p{ID_Start}][$\p{ID_Continue}]* to match javascript identifier-ish string, but in our case, we do want to match non identifier for array placeholder like 0 (in title $0), so just matching ID_Continue seems like a good choice.
sheremet-va
approved these changes
Jul 21, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
although it's unusual, it's theoretically possible to use non-ascii characters in variable names. For example:
currently, the test title formatter use RegEx
\w, so it doesn't support non-ascii values.\p{ID_Continue}has been supported since node v10, see Unicode's UAX31-D1 for more info.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
If you introduce new functionality, document it. You can run documentation withpnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.