Skip to content

Commit 00fc3a0

Browse files
comments: cut the development log from the four largest offenders (#684)
Continues #683's standard — write it the way you would if you were porting the file to another language. All four are TOKEN-IDENTICAL to their originals; comments only. slovenian/normalize.ts 458 → 380 (67-line header → 23) core/normalizeSymbols.ts 404 → 345 (185 of the remainder is genuine API spec) hungarian/normalize.ts 361 → 239 (107-line header → 35, the largest block in the repo) khmer/normalize.ts 307 → 236 (52-line header → 21) Out: corpus tabulations of pre-fix readings, post-change measurements, discovery attribution ("reported by the Ukrainian run"), and accounts of earlier wrong conclusions. In: every rule and trap — Slovenian's ordinal-period discriminator and the no-utterance-final-pause-lost invariant, its four-way DUAL agreement and why slavicCountForm cannot serve it, Hungarian's "lowercase follows" being stronger than "anything follows", Khmer native digits outnumbering ASCII, and normalizeSymbols' longest-first ordering, trailing apostrophe guard, mark guard and NOT_VERSION halves. normalizeSymbols deliberately stopped at 345: 185 of those lines document the ~30 SymbolData fields, which is specification a caller needs rather than narrative. Found a real trap doing it — `*tri*/*štiri*` in a block comment forms `*/` and terminates it early. Documented in CONTRIBUTING. A detector was written and then removed: it cannot be made precise (it also flags legitimate `text*/` endings and glob strings like "src/**/*.ts"), and typecheck catches the real thing every time since the remaining prose never parses. Running total across both PRs: 146 → 142 files, 16,610 → ~14,300 comment lines over 1:1. Prettier debt down again, 448 → 444. 224 test files / 3114 tests, typecheck clean.
1 parent 9711212 commit 00fc3a0

5 files changed

Lines changed: 927 additions & 766 deletions

File tree

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ porter has no history to tell, so they write what the code does and what will bi
5454

5555
Reference points in the tree: `src/core/hostWord.ts`, `src/languages/maori/normalize.ts`.
5656

57+
⚠ Beware `*/` forming by accident inside a block comment. Markdown-style emphasis around a slashed
58+
alternative does it — `*tri*/*štiri*` terminates the comment early and the rest of the block parses as
59+
code. `npm run typecheck` always catches it (the remaining prose never parses), but the error points
60+
*past* the real cause and usually reads as an unterminated regex. Look for emphasis before a slash.
61+
5762
When you cut comments, **do not touch code in the same commit**. Both files above were verified
5863
token-identical to their originals; that check is what makes a large comment pass reviewable.
5964

0 commit comments

Comments
 (0)