Documentation
¶
Overview ¶
Package parser extracts URLs from markdown content using goldmark.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
type Link struct {
URL string // The actual URL
FilePath string // Which file it was found in
Line int // Line number (1-indexed)
Column int // Column position (1-indexed)
Text string // Link text or alt text for images
Type LinkType // Type of link
// For reference links.
RefName string // Reference name (e.g., "myref" in [text][myref])
RefDefLine int // Line where [ref]: url is defined (0 if not reference)
}
Link represents a URL found in a file.
func ExtractLinks ¶
ExtractLinks reads a file and returns all HTTP/HTTPS links found.
func ExtractLinksFromContent ¶
ExtractLinksFromContent extracts links from markdown content.
func ExtractLinksFromMultipleFiles ¶
ExtractLinksFromMultipleFiles processes multiple files and returns all links.
type LinkType ¶
type LinkType int
LinkType represents the type of link found in markdown.
const ( // LinkTypeInline represents a standard markdown link: [text](url). LinkTypeInline LinkType = iota // LinkTypeReference represents a reference-style link: [text][ref] with [ref]: url. LinkTypeReference // LinkTypeImage represents an image: . LinkTypeImage // LinkTypeAutolink represents a bare URL that's auto-linked. LinkTypeAutolink // LinkTypeHTML represents a link in HTML: <a href="url">. LinkTypeHTML )
Click to show internal directories.
Click to hide internal directories.