Versions in this module Expand all Collapse all v0 v0.4.2 Aug 13, 2026 v0.4.1 Aug 10, 2026 Changes in this version + const HashPrefixLen + const MaxBlanksAroundMarker + func ApplyMarkers(lines []string, blocks []BlockResult) []string + func EmbedMeta(svg []byte, meta Meta) []byte + func EqualExceptGeneratedBy(a, b []byte) bool + func HashIPMT(src string) string + func IsKey(s string) bool + func IsMarkerCommentLine(line string) bool + func NormalizeIPMT(src string) string + func RenderAndWriteSVG(rootAbs, mdAbs string, br BlockResult, generatedBy string, forceMeta bool) (bool, error) + func RenderSVGBytes(rootAbs, mdAbs string, br BlockResult, generatedBy string) ([]byte, error) + func RenderSourceSVG(content string) ([]byte, error) + func SVGIsFresh(absPath, srcHash string) (bool, error) + type AnalyzeOptions struct + Root string + SVGDir string + SrcReader SrcReader + type BlockKind string + const KindInclude + const KindVisible + type BlockOutcome string + const OutcomeBadMeta + const OutcomeInsertMarker + const OutcomeMalformed + const OutcomeMissingSrc + const OutcomeNoEmbed + const OutcomeOK + const OutcomeRehash + const OutcomeRerender + const OutcomeUnterminated + type BlockResult struct + AnchorLine int + Content string + IncludeSrcAbs string + Index int + Kind BlockKind + MarkerLine int + Meta []string + NewMarker Marker + OldMarker Marker + OpenLine int + Outcome BlockOutcome + RenamedFromSVGPath string + SVGPath string + SkipReason string + SrcHash string + type FileAnalysis struct + Blocks []BlockResult + Lines []string + Path string + func AnalyzeMarkdown(absPath string, mdText string, opts AnalyzeOptions) (FileAnalysis, error) + func (a FileAnalysis) HasIPMT() bool + type Marker struct + Hash string + ID string + ImageAlt string + ImagePath string + Path string + Pos string + Unknown []UnknownAttr + func ParseMarker(commentLine, imageLine string) (Marker, bool) + func (m Marker) AttrsString() string + func (m Marker) Format() string + func (m Marker) FormatLines() [2]string + type Meta struct + GeneratedBy string + Hash string + SourceFile string + SourceID string + func ExtractMeta(svg []byte) (Meta, bool) + type SourceBlock struct + AnchorLine int + Content string + ExplicitID string + HasMarker bool + Kind BlockKind + Marker Marker + MarkerLine int + Meta []string + OpenLine int + Skip bool + SkipReason string + SrcPathRel string + func ScanBlocks(text string) (lines []string, blocks []SourceBlock) + type SrcReader func(absPath string) ([]byte, error) + type UnknownAttr struct + Key string + Value string