Commit 0058c7c
authored
fix(lint): allowlist lines with no Japanese characters (#1168)
prh (and other textlint rules) was incorrectly firing on lines that
contain no Japanese characters at all — most notably on English-only
paragraphs left untranslated by the d-additive defer flow during
`/update-origin`. `pnpm lint --fix` would then partially replace
tokens like `Signal Forms` with `シグナルフォーム` inside an
otherwise pure-English sentence, producing nonsensical bilingual
fragments like `シグナルフォームbuilds the field tree...`.
Add a textlint filter allowlist pattern that matches any single line
containing no Hiragana / Katakana / Han characters and excludes it
from rule evaluation. Multi-line English paragraphs are handled
line-by-line, so each pure-English line is skipped while truly
mixed lines (Japanese prose containing `Signal Forms`) still
trigger prh correctly.1 parent d7e996a commit 0058c7c
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
0 commit comments