You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
links/anchor-mismatch: German hyphenated compound does not match its closed form ("Online-Shop" vs "Onlineshop") #1598
The anchor names the target's topic. German writes the same compound hyphenated ("Online-Shop") or closed ("Onlineshop"), and the URL slug has the closed form too. The anchor splits into online and shop. online is a prefix of onlineshop, but four characters are left over, which is more than the documented limit of three, so no word is shared.
Expected: a hyphenated compound in the anchor also counts as a match when its parts, joined together, equal a target word (here online + shop = onlineshop), and the same the other way round. This is common in German (E-Mail/Email, Online-Shop/Onlineshop, Web-Seite/Webseite).
Report excerpt (items[] of the anchor-mismatch check):
An anchor whose hyphenated parts, joined together, equal a word in the target's title, heading or URL slug ("Online-Shop" and "onlineshop") is not reported
The reverse also holds: a closed-form anchor word equals the joined hyphenated parts of a target word
The match needs the whole joined form to equal a target word, so a hyphenated anchor that merely shares a short prefix is still reported
A regression test covers the German pair from this report and a hyphenated pair that must still warn
The rule docs state that hyphenated and closed compounds count as the same word
Thanks for the clear report. I added acceptance criteria, the bug type and labels. Hyphenated and closed compounds should count as the same word, so this is queued for the rules batch.
Fixed in 131810d (in v0.0.170, v0.0.171 and v0.0.172): a hyphenated compound now matches its closed form in anchor-mismatch, with tests and docs. tests/anchor-mismatch.test.ts passes on current main.
Activity
nc9 commentedon Nov 5, 2026
Thanks for the clear report. I added acceptance criteria, the bug type and labels. Hyphenated and closed compounds should count as the same word, so this is queued for the rules batch.
nik
fix(rules): a hyphenated compound matches its closed form in anchor-m…
fix(rules): anchor-mismatch hyphen-join scan is linear on long words #…
fix(rules): anchor-mismatch joined hyphen forms match by equality only …
fix(rules): anchor-mismatch joins only whole hyphen runs; adjacent jo…
fix(rules): a hyphenated compound matches its closed form in anchor-m…
fix(rules): anchor-mismatch hyphen-join scan is linear on long words #…
fix(rules): anchor-mismatch joined hyphen forms match by equality only …
fix(rules): anchor-mismatch joins only whole hyphen runs; adjacent jo…
nc9 commentedon Nov 7, 2026
Fixed in 131810d (in v0.0.170, v0.0.171 and v0.0.172): a hyphenated compound now matches its closed form in anchor-mismatch, with tests and docs. tests/anchor-mismatch.test.ts passes on current main.
nik