Documentation
¶
Overview ¶
Package parser reads markdown task files with YAML frontmatter.
It extracts structured model.Task values from .md files, deriving task IDs and titles from filenames when not specified in frontmatter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasTaskSignature ¶ added in v0.4.7
HasTaskSignature reports whether raw frontmatter text looks like it was intended to be taskmd frontmatter, based on the presence of task-signature keys (id, status, priority, dependencies).
This is a behavioral contract for error reporting: a file whose frontmatter is present but not valid YAML is reported as a broken task file only when it carries at least one of these keys. Foreign markdown with frontmatter (docs pages, blog posts) that lacks them is silently skipped, as before.
func ParseTaskContent ¶
ParseTaskContent parses task content from bytes
Types ¶
type ParseError ¶
type ParseError struct {
FilePath string
Message string
Err error
// Frontmatter holds the raw frontmatter text when the error came from a
// frontmatter block that was present but could not be parsed. It is nil
// for other errors (missing file, no frontmatter, missing fields).
Frontmatter []byte
}
ParseError represents an error during parsing
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) MalformedTaskFrontmatter ¶ added in v0.4.7
func (e *ParseError) MalformedTaskFrontmatter() bool
MalformedTaskFrontmatter reports whether this error came from a file whose frontmatter was present but invalid, and whose raw text carries task-signature keys (see HasTaskSignature). Scanners use it to distinguish a broken task file, which must be reported, from foreign markdown, which is silently skipped.