Documentation
¶
Overview ¶
Package refs extracts internal markdown link targets from rendered content. It is pure and stdlib-only: it performs no I/O and resolves no paths - callers resolve and stat the returned targets. (ADR-0020)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Links ¶
Links returns the relative-path targets of inline markdown links - [text](target) - in content, in order of appearance. Image-link destinations () are extracted too, so a dead image counts as a dead reference. It skips: external targets (http://, https://, mailto:, tel:) and bare #fragment anchors; links inside a fenced code block (opened by ``` or ~~~); and links inside an inline code span (text between paired `-backtick delimiters). A trailing #anchor and a (target "title") title are stripped, leaving the bare relative path. Reference-style links ([text][id]) and 4-space-indented code blocks are out of scope.
func WithoutFences ¶ added in v0.6.0
WithoutFences returns content minus fenced-code-block lines (opened by ``` or ~~~; delimiter lines dropped too). Inline code spans are deliberately kept - scanners like the skill-reference check (ADR-0046) match tokens that legitimately render inside single-backtick spans.
Types ¶
This section is empty.