Documentation
¶
Index ¶
- func IsTestFile(_ string) bool
- func ParseHTMLLinks(sourceCode []byte) []string
- func ResolveHTMLLinkPath(sourceFile, linkPath string, suppliedFiles map[string]bool) []string
- func ResolveHTMLProjectImports(absPath string, _ string, _ string, suppliedFiles map[string]bool, ...) ([]string, error)
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTestFile ¶
IsTestFile reports whether the given HTML path is a test file. HTML documents have no widely shared test-file convention, so every HTML file is treated as production content.
func ParseHTMLLinks ¶
ParseHTMLLinks extracts file-reference destinations from `href` / `src` attributes in HTML source. Values are normalized: external URLs, anchors, and non-file references are dropped. Attribute parsing is driven by tree-sitter, so destinations inside comments or element text are never matched.
func ResolveHTMLLinkPath ¶
ResolveHTMLLinkPath resolves an HTML link target against the source file's directory and returns matching project files.
Server-absolute links ("/css/app.css") do not share the filesystem root, so they are resolved by suffix-matching the supplied project files, mirroring the Markdown resolver.
func ResolveHTMLProjectImports ¶
func ResolveHTMLProjectImports( absPath string, _ string, _ string, suppliedFiles map[string]bool, contentReader vcs.ContentReader, ) ([]string, error)
ResolveHTMLProjectImports extracts link/asset references from an HTML file and returns the supplied project paths they resolve to.
Types ¶
type Provider ¶
type Provider struct{}
func (Provider) Extensions ¶
func (Provider) IsTestFile ¶
func (Provider) IsTestFile(filePath string, _ vcs.ContentReader) bool
func (Provider) Maturity ¶
func (Provider) Maturity() moduleapi.MaturityLevel