Documentation
¶
Overview ¶
Package task provides task item parsing, matching, and domain logic.
Package task provides task item parsing and matching.
This package handles the domain logic for task items, independent of their Markdown representation.
Index ¶
Constants ¶
View Source
const ( MatchFull = iota // Full match MatchIndent // Leading whitespace MatchState // "x" or " " or "" MatchContent // Task text )
Match indices for accessing capture groups.
Usage:
match := task.ItemPattern.FindStringSubmatch(line)
if match != nil {
indent := match[task.MatchIndent]
state := match[task.MatchState]
content := match[task.MatchContent]
}
Variables ¶
This section is empty.
Functions ¶
func Completed ¶
Completed reports whether a match represents a completed task.
Parameters:
- match: Result from ItemPattern.FindStringSubmatch
Returns:
- bool: True if the checkbox is checked ([x])
func Content ¶
Content returns the task text from a match.
Parameters:
- match: Result from ItemPattern.FindStringSubmatch
Returns:
- string: Task content (empty if the match is invalid)
func Indent ¶
Indent returns the leading whitespace from a match.
Parameters:
- match: Result from ItemPattern.FindStringSubmatch
Returns:
- string: Indent string (may be empty for top-level tasks)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.