Skip to content

Commit d9712b3

Browse files
clauderazor-x
authored andcommitted
fix: exclude angle brackets from bare URL match in validate-links
The bare absolute-URL regex stopped only at whitespace, `)`, and `"`. When a `docs.seam.co/latest/...` URL appeared as anchor text inside HTML (e.g. `>https://docs.seam.co/latest/foo</a></td>`), the match greedily swallowed the trailing tags and reported the malformed path as broken. Adding `<` and `>` to the exclusion set lets the bare URL pattern terminate at the closing `<`, so cross-section absolute URLs in the guides README validate cleanly.
1 parent 370e3bd commit d9712b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codegen/validate-links.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function findSiteSection(filePath: string): SiteSection | undefined {
1313
}
1414

1515
const absoluteUrlPattern = new RegExp(
16-
`${baseUrl.replaceAll('.', '\\.')}[^)"\\s]+`,
16+
`${baseUrl.replaceAll('.', '\\.')}[^)"<>\\s]+`,
1717
'g',
1818
)
1919

0 commit comments

Comments
 (0)