Skip to content

links/anchor-mismatch: German hyphenated compound does not match its closed form ("Online-Shop" vs "Onlineshop") #1598

Closed

Description

@deniskern

Version: squirrel v0.0.169 (audit https://www.one-dot.de -m 30 --http --offline --no-publish -f json)

The rule warns on this pair:

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):

{"id": "https://one-dot.de/headless-e-commerce-agentur -> https://one-dot.de/onlineshop-agentur",
 "label": "\"Online-Shop Umsetzung\" -> https://one-dot.de/onlineshop-agentur (title: \"Onlineshop Agentur: Shopsystem, Relaunch, Betreuung | ONEDOT\")"}

Acceptance Criteria

  • 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

Activity

  1. added
    bug
    rules
    size: S
    on Nov 5, 2026
  2. nc9 commented on Nov 5, 2026

    @nc9
    Contributor

    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

  3. added theissue type on Nov 5, 2026
  4. nc9 commented on Nov 7, 2026

    @nc9
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions