Documentation
¶
Overview ¶
Package markup implements lightweight regex-based parsers for markup and style languages: HTML, CSS, SCSS, and Markdown. No tree-sitter dependency — pure Go regex extraction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct {
Path string
Type string // "link", "script", "import", "url"
LineNumber int
}
Dependency represents a linked resource.
type Entity ¶
type Entity struct {
Name string
Type string // "heading", "id", "selector", "rule", "mixin", "variable", "media_query", "link"
Kind string
Signature string
StartLine int
EndLine int
Parent string
}
Entity represents a named element extracted from markup.
type ParseResult ¶
type ParseResult struct {
FilePath string
Entities []*Entity
Dependencies []*Dependency
}
ParseResult is the output of a markup parse.
func ParseCSS ¶
func ParseCSS(filePath string, content string) *ParseResult
ParseCSS extracts selectors, @import, and @media rules.
func ParseHTML ¶
func ParseHTML(filePath string, content string) *ParseResult
ParseHTML extracts element IDs and linked resources.
func ParseMarkdown ¶
func ParseMarkdown(filePath string, content string) *ParseResult
ParseMarkdown extracts headings and links.
func ParseSCSS ¶
func ParseSCSS(filePath string, content string) *ParseResult
ParseSCSS extracts variables, mixins, selectors, and @import/@use.
Click to show internal directories.
Click to hide internal directories.