sotashimozono_obsidian-remo.../scripts
Souta 3072681c18 fix(docs-ci): slugify keeps Unicode letters so JA anchors are checkable
The slugify in check-docs-links.mjs stripped all non-ASCII via
`[^a-z0-9\s\-]`, so every Japanese / CJK / accented heading collapsed
to the same empty string `""`. Both the heading-set entry AND the
parsed anchor would slugify to `""` → silent match → any bad JA anchor
slipped through the gate.

Concrete demonstration before the fix:
  '概要'              -> ''
  '詳細'              -> ''
  '使い方'            -> ''
  '何ができるか'      -> ''

After the fix (Unicode-aware via `\p{L}\p{N}` + NFC):
  '概要'              -> '概要'
  '詳細'              -> '詳細'
  '使い方'            -> '使い方'
  '何ができるか'      -> '何ができるか'

Verified by injecting a deliberately-bad JA anchor
(`[[ja/migration/from-obsidian-sync#存在しない見出し]]`) and confirming
the checker now reports
  (slug "存在しない見出し" not in docs/ja/migration/from-obsidian-sync.md)
instead of silently passing.

ASCII-only headings produce identical slugs as before
(`Backup & restore` → `backup-restore`), so no regression on the EN
tree.

This matters now that the JA tree (PRs #313 + #314) is shipping in
1.0.46 — the gate would have given false confidence on the new
content.

Carryover from PR #309 review.
2026-05-10 23:25:11 +09:00
..
check-docs-links.mjs fix(docs-ci): slugify keeps Unicode letters so JA anchors are checkable 2026-05-10 23:25:11 +09:00