Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Link ¶
type Link struct {
Target string
Display string
Start int // byte offset in Styled (start of the styled link span)
End int // byte offset in Styled (exclusive, end of the styled link span)
}
Link is one wiki-link occurrence inside the styled output.
Display is the user-visible link text (target or alias). It's exposed so the view layer can re-render the link with combined cursor + link styling in one pass — slicing Styled[Start:End] yields bytes that already contain SGR codes, and wrapping those produces nested resets that clobber the cursor highlight and any surrounding Glamour styling.
type Result ¶
type Result struct {
Styled string
Links []Link
// Tasks holds the byte offset in Styled of each open task marker
// (TODO/LATER/DOING/WAITING with non-empty text), in document order.
// The index matches graph.TodoBullet.Ordinal so the view layer can
// deep-link a dashboard todo to its rendered row.
Tasks []int
// Finds holds the byte offset in Styled of each highlighted emphasis-term
// occurrence, in document order. Empty unless rendered with an emphasis term.
Finds []int
}
Result is the rendered page.
Click to show internal directories.
Click to hide internal directories.