Commit 8c54a88
fix(scan): resolve "Reg-" prefixed region shortcodes to full names
PR #3035 made region/language shortcode lookups case-sensitive by keying
REGIONS_BY_SHORTCODE on the uppercase codes, and updated the plain tag
lookups to match against the raw (unlowered) tag. The "Reg-" prefix branch
was missed: it still lowercased the captured shortcode before looking it up,
so it could never hit the now-uppercase-keyed dict. As a result a tag like
"[Reg-J]" was stored as the raw "J" instead of resolving to "Japan".
Match the shortcode with its original case, like the other lookups, so
"[Reg-J]" resolves to "Japan" and "[Reg-U]" to "USA". Non-shortcode values
(e.g. "[Reg-PAL]") are still kept verbatim via the fallback.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent b85ecc5 commit 8c54a88
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
275 | 284 | | |
276 | 285 | | |
277 | 286 | | |
| |||
0 commit comments