fix(docs): allow balanced parens in markdown link URLs
Previously the link-checker regex stopped at the first ')', breaking on Next.js route-group paths like `app/(app)/...`. The new regex matches one level of balanced parens inside the URL. Caught by CI on PR #188 — pre-existing breakage from PBI-78 plan doc that was already merged on main. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ef34dc270e
commit
499f4c10b6
1 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,9 @@ function headingSlugs(filePath) {
|
|||
return slugs;
|
||||
}
|
||||
|
||||
const LINK_RE = /\[(?:[^\]]*)\]\(([^)]+)\)/g;
|
||||
// Match `[label](url)` where url may contain one level of balanced parens
|
||||
// (e.g. Next.js route groups like `app/(app)/...`).
|
||||
const LINK_RE = /\[(?:[^\]]*)\]\(((?:[^()]+|\([^()]*\))+)\)/g;
|
||||
|
||||
function checkFile(filePath) {
|
||||
const content = readFileSync(filePath, 'utf8');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue