Commit Graph

3 Commits

Author SHA1 Message Date
Zied Jlassi 3df821d26e fix(validate-refs): also catch lowercase drive letters in leak check
Following review feedback, widen the Windows branch to [A-Za-z] so
lowercase paths (c:\Users\...) are caught too. Kept a \b anchor so URL
schemes like https:// (which also contain "<letter>:/") aren't flagged —
a plain [A-Za-z] would have matched every URL in the docs.

Added lowercase and URL-not-flagged cases to the test (now 8/8).
2026-06-20 20:27:17 +02:00
Zied Jlassi 9c4dde977d test(validate-refs): document test helpers with JSDoc
Added JSDoc to the test/assert/leakCount helpers so the new test file
documents its own helpers. No behaviour change — 6/6 still pass.
2026-06-20 15:20:10 +02:00
Zied Jlassi eecb6dd5f8 fix(validate-refs): flag single-backslash Windows path leaks
The absolute-path-leak check used `[A-Z]:\\\\`, which in a regex literal
needs two backslashes — so a normal Windows path like C:\Users\... slipped
straight through. Widened it to match either separator (C:\ or C:/).

While here, exported checkAbsolutePathLeaks and added a small test
(test/test-abs-path-leak.js, wired into npm test) covering the
single-backslash case plus the existing Unix and code-block behaviour.
2026-06-20 14:21:38 +02:00