Commit 96b4a9a
Stripped invisibles are transparent to the interpunct flank guard
The B7 flank guard read text[i-1]/text[i+1] raw, so a policy-stripped
invisible adjacent to the dot defeated it: parse("威廉·莎士比亚")
left the literal dot in the family field, lost the order suppression,
and the polluted token defeated the script license too. That input is
the real-world case strip_bidi exists for -- RTL documents quoting
Chinese transcriptions get U+200E/200F inserted at script transitions,
in text visually identical to the clean form.
The guard now walks each flank past characters the strip policy
removes (bidi when strip_bidi, emoji when strip_emoji) before
classifying: a character that vanishes from the token stream cannot
occupy a flank position either. Whitespace, commas, and the name-dot
separators remain guard-defeating -- a dot beside a space is not
between characters -- and the region-local bounds are unchanged, so
the pinned edge behavior stays.
Also pins the guard's edge coverage the surviving mutants demanded:
the trailing-dot upper bound (whose loss is an IndexError, not a
wrong answer), the minimal one-char flanks, the one-sided flank
(the AND, and that no spurious offset records), and hangul flanks
(마틴·루터·킹 -- Korean writes interpunct transcriptions too).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 9fdb3f2 commit 96b4a9a
2 files changed
Lines changed: 93 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
68 | 91 | | |
69 | 92 | | |
70 | 93 | | |
| |||
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
93 | | - | |
94 | | - | |
| 116 | + | |
95 | 117 | | |
96 | 118 | | |
97 | 119 | | |
| |||
105 | 127 | | |
106 | 128 | | |
107 | 129 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
119 | 147 | | |
120 | 148 | | |
121 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
142 | 194 | | |
143 | 195 | | |
144 | 196 | | |
| |||
0 commit comments