Commit 852dff8
committed
fix(weidu-d): keep formatter idempotent when a ~string~ abuts a keyword
A transition trigger written with no space before THEN (~..NOTVALID)~THEN,
valid WeiDU) formatted to ~..~THEN on the first pass but ~..~ THEN once the
broken line was reparsed, so the formatter was not idempotent and the
external format sweep failed on BG1NPC's x#faint.d.
normalizeTransitionText now inserts a separating space at a ~/"-delimited
string <-> word-character boundary (either direction), so the trigger and the
following keyword are always spaced. %-delimited strings are deliberately
excluded: %var%-interpolated names (%tutu_var%KELDDA, TAZOK%eet_var%) abut
literal text on purpose and must not be split.
Unparks x#faint.d (previously excluded for this bug). Full IE format sweep is
green with it back in; added a CLI idempotence regression test.1 parent ce23663 commit 852dff8
3 files changed
Lines changed: 36 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
91 | 102 | | |
92 | 103 | | |
93 | | - | |
| 104 | + | |
94 | 105 | | |
95 | 106 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
102 | 110 | | |
| 111 | + | |
103 | 112 | | |
104 | 113 | | |
105 | | - | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
356 | 374 | | |
0 commit comments