Documentation
¶
Index ¶
- func Debug(node Node) string
- type AdvancedCommand
- func (n *AdvancedCommand) NextSibling() Node
- func (n *AdvancedCommand) Parent() HasChildren
- func (n *AdvancedCommand) PreviousSibling() Node
- func (n *AdvancedCommand) RemoveSelf()
- func (n *AdvancedCommand) ReplaceWith(node Node)
- func (h *AdvancedCommand) WithType(variant string) *AdvancedCommand
- func (h *AdvancedCommand) WithValue(value string) *AdvancedCommand
- type AutoLink
- func (l *AutoLink) GetURL() string
- func (n *AutoLink) NextSibling() Node
- func (n *AutoLink) Parent() HasChildren
- func (n *AutoLink) PreviousSibling() Node
- func (n *AutoLink) RemoveSelf()
- func (n *AutoLink) ReplaceWith(node Node)
- func (l *AutoLink) ReplaceWithLink(text ...Node) *Link
- func (l *AutoLink) WithURL(target string) *AutoLink
- type Block
- func (c *Block) AddChild(node Node)
- func (c *Block) AddChildren(nodes ...Node)
- func (b *Block) Blocks() BlockList
- func (c *Block) Children() NodeList
- func (b *Block) Content() NodeList
- func (c *Block) FirstChild() Node
- func (n *Block) GomegaString() string
- func (b *Block) ID() string
- func (c *Block) InsertChildAfter(node Node, after Node) bool
- func (c *Block) InsertChildBefore(node Node, before Node) bool
- func (c *Block) LastChild() Node
- func (c *Block) PrependChild(node Node)
- func (c *Block) PrependChildren(nodes ...Node)
- func (b *Block) Properties() *Properties
- func (c *Block) RemoveChild(node Node) bool
- func (c *Block) RemoveChildren(nodes ...Node)
- func (c *Block) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Block) SetChildren(nodes ...Node)
- func (b *Block) WithID() *Block
- type BlockEmbed
- type BlockList
- type BlockNode
- type BlockRef
- type Blockquote
- func (c *Blockquote) AddChild(node Node)
- func (c *Blockquote) AddChildren(nodes ...Node)
- func (c *Blockquote) Children() NodeList
- func (c *Blockquote) FirstChild() Node
- func (c *Blockquote) InsertChildAfter(node Node, after Node) bool
- func (c *Blockquote) InsertChildBefore(node Node, before Node) bool
- func (c *Blockquote) LastChild() Node
- func (c *Blockquote) PrependChild(node Node)
- func (c *Blockquote) PrependChildren(nodes ...Node)
- func (p *Blockquote) PreviousLineType() PreviousLineType
- func (c *Blockquote) RemoveChild(node Node) bool
- func (c *Blockquote) RemoveChildren(nodes ...Node)
- func (c *Blockquote) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Blockquote) SetChildren(nodes ...Node)
- func (p *Blockquote) SetPreviousLineType(previousLineType PreviousLineType)
- func (b *Blockquote) WithPreviousLineType(t PreviousLineType) *Blockquote
- type Cloze
- type CodeBlock
- func (n *CodeBlock) NextSibling() Node
- func (n *CodeBlock) Parent() HasChildren
- func (p *CodeBlock) PreviousLineType() PreviousLineType
- func (n *CodeBlock) PreviousSibling() Node
- func (n *CodeBlock) RemoveSelf()
- func (n *CodeBlock) ReplaceWith(node Node)
- func (p *CodeBlock) SetPreviousLineType(previousLineType PreviousLineType)
- func (c *CodeBlock) WithCode(code string) *CodeBlock
- func (c *CodeBlock) WithLanguage(language string) *CodeBlock
- func (c *CodeBlock) WithPreviousLineType(previousLineType PreviousLineType) *CodeBlock
- type CodeSpan
- type Emphasis
- func (c *Emphasis) AddChild(node Node)
- func (c *Emphasis) AddChildren(nodes ...Node)
- func (c *Emphasis) Children() NodeList
- func (c *Emphasis) FirstChild() Node
- func (c *Emphasis) InsertChildAfter(node Node, after Node) bool
- func (c *Emphasis) InsertChildBefore(node Node, before Node) bool
- func (c *Emphasis) LastChild() Node
- func (c *Emphasis) PrependChild(node Node)
- func (c *Emphasis) PrependChildren(nodes ...Node)
- func (c *Emphasis) RemoveChild(node Node) bool
- func (c *Emphasis) RemoveChildren(nodes ...Node)
- func (c *Emphasis) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Emphasis) SetChildren(nodes ...Node)
- type HasChildren
- type HasLinkURL
- type Hashtag
- type Heading
- func (c *Heading) AddChild(node Node)
- func (c *Heading) AddChildren(nodes ...Node)
- func (c *Heading) Children() NodeList
- func (c *Heading) FirstChild() Node
- func (c *Heading) InsertChildAfter(node Node, after Node) bool
- func (c *Heading) InsertChildBefore(node Node, before Node) bool
- func (c *Heading) LastChild() Node
- func (c *Heading) PrependChild(node Node)
- func (c *Heading) PrependChildren(nodes ...Node)
- func (c *Heading) RemoveChild(node Node) bool
- func (c *Heading) RemoveChildren(nodes ...Node)
- func (c *Heading) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Heading) SetChildren(nodes ...Node)
- type Image
- func (c *Image) AddChild(node Node)
- func (c *Image) AddChildren(nodes ...Node)
- func (c *Image) Children() NodeList
- func (c *Image) FirstChild() Node
- func (c *Image) InsertChildAfter(node Node, after Node) bool
- func (c *Image) InsertChildBefore(node Node, before Node) bool
- func (c *Image) LastChild() Node
- func (c *Image) PrependChild(node Node)
- func (c *Image) PrependChildren(nodes ...Node)
- func (c *Image) RemoveChild(node Node) bool
- func (c *Image) RemoveChildren(nodes ...Node)
- func (c *Image) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Image) SetChildren(nodes ...Node)
- func (i *Image) WithTitle(title string) *Image
- func (i *Image) WithURL(src string) *Image
- type InlineNode
- type Link
- func (c *Link) AddChild(node Node)
- func (c *Link) AddChildren(nodes ...Node)
- func (c *Link) Children() NodeList
- func (c *Link) FirstChild() Node
- func (l *Link) GetURL() string
- func (c *Link) InsertChildAfter(node Node, after Node) bool
- func (c *Link) InsertChildBefore(node Node, before Node) bool
- func (c *Link) LastChild() Node
- func (c *Link) PrependChild(node Node)
- func (c *Link) PrependChildren(nodes ...Node)
- func (c *Link) RemoveChild(node Node) bool
- func (c *Link) RemoveChildren(nodes ...Node)
- func (c *Link) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Link) SetChildren(nodes ...Node)
- func (l *Link) WithTitle(title string) *Link
- func (l *Link) WithURL(url string) *Link
- type List
- func (c *List) AddChild(node Node)
- func (c *List) AddChildren(nodes ...Node)
- func (c *List) Children() NodeList
- func (c *List) FirstChild() Node
- func (c *List) InsertChildAfter(node Node, after Node) bool
- func (c *List) InsertChildBefore(node Node, before Node) bool
- func (c *List) LastChild() Node
- func (c *List) PrependChild(node Node)
- func (c *List) PrependChildren(nodes ...Node)
- func (p *List) PreviousLineType() PreviousLineType
- func (c *List) RemoveChild(node Node) bool
- func (c *List) RemoveChildren(nodes ...Node)
- func (c *List) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *List) SetChildren(nodes ...Node)
- func (p *List) SetPreviousLineType(previousLineType PreviousLineType)
- func (l *List) WithMarker(marker byte) *List
- func (c *List) WithPreviousLineType(t PreviousLineType) *List
- func (l *List) WithType(typ ListType) *List
- type ListItem
- func (c *ListItem) AddChild(node Node)
- func (c *ListItem) AddChildren(nodes ...Node)
- func (c *ListItem) Children() NodeList
- func (c *ListItem) FirstChild() Node
- func (c *ListItem) InsertChildAfter(node Node, after Node) bool
- func (c *ListItem) InsertChildBefore(node Node, before Node) bool
- func (c *ListItem) LastChild() Node
- func (c *ListItem) PrependChild(node Node)
- func (c *ListItem) PrependChildren(nodes ...Node)
- func (c *ListItem) RemoveChild(node Node) bool
- func (c *ListItem) RemoveChildren(nodes ...Node)
- func (c *ListItem) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *ListItem) SetChildren(nodes ...Node)
- type ListSection
- func (c *ListSection) AddChild(node Node)
- func (c *ListSection) AddChildren(nodes ...Node)
- func (c *ListSection) Children() NodeList
- func (c *ListSection) FirstChild() Node
- func (c *ListSection) InsertChildAfter(node Node, after Node) bool
- func (c *ListSection) InsertChildBefore(node Node, before Node) bool
- func (c *ListSection) LastChild() Node
- func (c *ListSection) PrependChild(node Node)
- func (c *ListSection) PrependChildren(nodes ...Node)
- func (c *ListSection) RemoveChild(node Node) bool
- func (c *ListSection) RemoveChildren(nodes ...Node)
- func (c *ListSection) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *ListSection) SetChildren(nodes ...Node)
- type ListType
- type Logbook
- func (c *Logbook) AddChild(node Node)
- func (c *Logbook) AddChildren(nodes ...Node)
- func (c *Logbook) Children() NodeList
- func (c *Logbook) FirstChild() Node
- func (c *Logbook) InsertChildAfter(node Node, after Node) bool
- func (c *Logbook) InsertChildBefore(node Node, before Node) bool
- func (c *Logbook) LastChild() Node
- func (c *Logbook) PrependChild(node Node)
- func (c *Logbook) PrependChildren(nodes ...Node)
- func (p *Logbook) PreviousLineType() PreviousLineType
- func (c *Logbook) RemoveChild(node Node) bool
- func (c *Logbook) RemoveChildren(nodes ...Node)
- func (c *Logbook) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Logbook) SetChildren(nodes ...Node)
- func (p *Logbook) SetPreviousLineType(previousLineType PreviousLineType)
- func (l *Logbook) WithPreviousLineType(t PreviousLineType) *Logbook
- type LogbookEntry
- type LogbookEntryRaw
- type Macro
- type Node
- type NodeList
- type NodePredicate
- type PageEmbed
- type PageLink
- type PageRef
- type Paragraph
- func (c *Paragraph) AddChild(node Node)
- func (c *Paragraph) AddChildren(nodes ...Node)
- func (c *Paragraph) Children() NodeList
- func (c *Paragraph) FirstChild() Node
- func (c *Paragraph) InsertChildAfter(node Node, after Node) bool
- func (c *Paragraph) InsertChildBefore(node Node, before Node) bool
- func (c *Paragraph) LastChild() Node
- func (c *Paragraph) PrependChild(node Node)
- func (c *Paragraph) PrependChildren(nodes ...Node)
- func (p *Paragraph) PreviousLineType() PreviousLineType
- func (c *Paragraph) RemoveChild(node Node) bool
- func (c *Paragraph) RemoveChildren(nodes ...Node)
- func (c *Paragraph) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Paragraph) SetChildren(nodes ...Node)
- func (p *Paragraph) SetPreviousLineType(previousLineType PreviousLineType)
- func (p *Paragraph) WithPreviousLineType(t PreviousLineType) *Paragraph
- type PreviousLineAware
- type PreviousLineType
- type Properties
- func (c *Properties) AddChild(node Node)
- func (c *Properties) AddChildren(nodes ...Node)
- func (c *Properties) Children() NodeList
- func (c *Properties) FirstChild() Node
- func (p *Properties) Get(key string) NodeList
- func (p *Properties) GetAsNode(key string) *Property
- func (c *Properties) InsertChildAfter(node Node, after Node) bool
- func (c *Properties) InsertChildBefore(node Node, before Node) bool
- func (c *Properties) LastChild() Node
- func (c *Properties) PrependChild(node Node)
- func (c *Properties) PrependChildren(nodes ...Node)
- func (p *Properties) PreviousLineType() PreviousLineType
- func (p *Properties) Remove(key string)
- func (c *Properties) RemoveChild(node Node) bool
- func (c *Properties) RemoveChildren(nodes ...Node)
- func (c *Properties) ReplaceChild(oldNode Node, newNode Node) bool
- func (p *Properties) Set(key string, nodes ...Node)
- func (c *Properties) SetChildren(nodes ...Node)
- func (p *Properties) SetPreviousLineType(previousLineType PreviousLineType)
- func (p *Properties) WithPreviousLineType(t PreviousLineType) *Properties
- type Property
- func (c *Property) AddChild(node Node)
- func (c *Property) AddChildren(nodes ...Node)
- func (c *Property) Children() NodeList
- func (c *Property) FirstChild() Node
- func (c *Property) InsertChildAfter(node Node, after Node) bool
- func (c *Property) InsertChildBefore(node Node, before Node) bool
- func (c *Property) LastChild() Node
- func (c *Property) PrependChild(node Node)
- func (c *Property) PrependChildren(nodes ...Node)
- func (c *Property) RemoveChild(node Node) bool
- func (c *Property) RemoveChildren(nodes ...Node)
- func (c *Property) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Property) SetChildren(nodes ...Node)
- func (p *Property) WithName(name string) *Property
- type Query
- type QueryCommand
- type QuoteCommand
- type RawHTML
- type RawHTMLBlock
- type RawText
- type Strikethrough
- func (c *Strikethrough) AddChild(node Node)
- func (c *Strikethrough) AddChildren(nodes ...Node)
- func (c *Strikethrough) Children() NodeList
- func (c *Strikethrough) FirstChild() Node
- func (c *Strikethrough) InsertChildAfter(node Node, after Node) bool
- func (c *Strikethrough) InsertChildBefore(node Node, before Node) bool
- func (c *Strikethrough) LastChild() Node
- func (c *Strikethrough) PrependChild(node Node)
- func (c *Strikethrough) PrependChildren(nodes ...Node)
- func (c *Strikethrough) RemoveChild(node Node) bool
- func (c *Strikethrough) RemoveChildren(nodes ...Node)
- func (c *Strikethrough) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Strikethrough) SetChildren(nodes ...Node)
- type Strong
- func (c *Strong) AddChild(node Node)
- func (c *Strong) AddChildren(nodes ...Node)
- func (c *Strong) Children() NodeList
- func (c *Strong) FirstChild() Node
- func (c *Strong) InsertChildAfter(node Node, after Node) bool
- func (c *Strong) InsertChildBefore(node Node, before Node) bool
- func (c *Strong) LastChild() Node
- func (c *Strong) PrependChild(node Node)
- func (c *Strong) PrependChildren(nodes ...Node)
- func (c *Strong) RemoveChild(node Node) bool
- func (c *Strong) RemoveChildren(nodes ...Node)
- func (c *Strong) ReplaceChild(oldNode Node, newNode Node) bool
- func (c *Strong) SetChildren(nodes ...Node)
- type TaskMarker
- type TaskStatus
- type Text
- func (n *Text) NextSibling() Node
- func (n *Text) Parent() HasChildren
- func (n *Text) PreviousSibling() Node
- func (n *Text) RemoveSelf()
- func (n *Text) ReplaceWith(node Node)
- func (t *Text) WithHardLineBreak() *Text
- func (t *Text) WithNoLineBreak() *Text
- func (t *Text) WithSoftLineBreak() *Text
- func (t *Text) WithValue(value string) *Text
- type ThematicBreak
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdvancedCommand ¶
type AdvancedCommand struct { // Type is the type of the advanced command. Type string // Value is the value of the advanced command. Specific to the type of // command. Value string // contains filtered or unexported fields }
AdvancedCommand represents an unknown command that is a BEGIN..END section within a block.
See https://docs.logseq.com/#/page/advanced%20commands
func NewAdvancedCommand ¶
func NewAdvancedCommand(variant string, value string) *AdvancedCommand
func (*AdvancedCommand) NextSibling ¶
func (n *AdvancedCommand) NextSibling() Node
func (*AdvancedCommand) Parent ¶
func (n *AdvancedCommand) Parent() HasChildren
func (*AdvancedCommand) PreviousSibling ¶
func (n *AdvancedCommand) PreviousSibling() Node
func (*AdvancedCommand) RemoveSelf ¶
func (n *AdvancedCommand) RemoveSelf()
func (*AdvancedCommand) ReplaceWith ¶
func (n *AdvancedCommand) ReplaceWith(node Node)
func (*AdvancedCommand) WithType ¶
func (h *AdvancedCommand) WithType(variant string) *AdvancedCommand
WithType sets the type of the advanced command.
func (*AdvancedCommand) WithValue ¶
func (h *AdvancedCommand) WithValue(value string) *AdvancedCommand
WithValue sets the value of the advanced command.
type AutoLink ¶
type AutoLink struct { // URL is where this link points to. URL string // contains filtered or unexported fields }
func NewAutoLink ¶
func (*AutoLink) NextSibling ¶
func (n *AutoLink) NextSibling() Node
func (*AutoLink) Parent ¶
func (n *AutoLink) Parent() HasChildren
func (*AutoLink) PreviousSibling ¶
func (n *AutoLink) PreviousSibling() Node
func (*AutoLink) RemoveSelf ¶
func (n *AutoLink) RemoveSelf()
func (*AutoLink) ReplaceWith ¶
func (n *AutoLink) ReplaceWith(node Node)
func (*AutoLink) ReplaceWithLink ¶
ReplaceWithLink replaces this node with a new `Link` node containing the given text.
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block is a piece of information in an outline, either belonging to a page or another block.
func (*Block) AddChildren ¶
func (c *Block) AddChildren(nodes ...Node)
func (*Block) Content ¶
Content gets the content part of this block, which is all children that are not blocks.
func (*Block) FirstChild ¶
func (c *Block) FirstChild() Node
func (*Block) GomegaString ¶
func (*Block) ID ¶
ID gets the identifier of the block. If the block does not have an ID this will return an empty string.
func (*Block) InsertChildAfter ¶
func (*Block) InsertChildBefore ¶
func (*Block) PrependChild ¶
func (c *Block) PrependChild(node Node)
func (*Block) PrependChildren ¶
func (c *Block) PrependChildren(nodes ...Node)
func (*Block) Properties ¶
func (b *Block) Properties() *Properties
Properties gets the properties node for this block. This follows the Logseq implementation where properties at the start of the block are the ones that are indexed.
If such properties do not exist, they are created to allow for easy manipulation of properties.
func (*Block) RemoveChild ¶
func (*Block) RemoveChildren ¶
func (c *Block) RemoveChildren(nodes ...Node)
func (*Block) ReplaceChild ¶
func (*Block) SetChildren ¶
func (c *Block) SetChildren(nodes ...Node)
type BlockEmbed ¶
type BlockEmbed struct { ID string // contains filtered or unexported fields }
func NewBlockEmbed ¶
func NewBlockEmbed(id string) *BlockEmbed
func (*BlockEmbed) NextSibling ¶
func (n *BlockEmbed) NextSibling() Node
func (*BlockEmbed) Parent ¶
func (n *BlockEmbed) Parent() HasChildren
func (*BlockEmbed) PreviousSibling ¶
func (n *BlockEmbed) PreviousSibling() Node
func (*BlockEmbed) RemoveSelf ¶
func (n *BlockEmbed) RemoveSelf()
func (*BlockEmbed) ReplaceWith ¶
func (n *BlockEmbed) ReplaceWith(node Node)
type BlockRef ¶
type BlockRef struct { // ID is the id of the block to reference. ID string // contains filtered or unexported fields }
func NewBlockRef ¶
func (*BlockRef) NextSibling ¶
func (n *BlockRef) NextSibling() Node
func (*BlockRef) Parent ¶
func (n *BlockRef) Parent() HasChildren
func (*BlockRef) PreviousSibling ¶
func (n *BlockRef) PreviousSibling() Node
func (*BlockRef) RemoveSelf ¶
func (n *BlockRef) RemoveSelf()
func (*BlockRef) ReplaceWith ¶
func (n *BlockRef) ReplaceWith(node Node)
type Blockquote ¶
type Blockquote struct {
// contains filtered or unexported fields
}
func NewBlockquote ¶
func NewBlockquote(children ...Node) *Blockquote
func (*Blockquote) AddChildren ¶
func (c *Blockquote) AddChildren(nodes ...Node)
func (*Blockquote) FirstChild ¶
func (c *Blockquote) FirstChild() Node
func (*Blockquote) InsertChildAfter ¶
func (*Blockquote) InsertChildBefore ¶
func (*Blockquote) PrependChild ¶
func (c *Blockquote) PrependChild(node Node)
func (*Blockquote) PrependChildren ¶
func (c *Blockquote) PrependChildren(nodes ...Node)
func (*Blockquote) PreviousLineType ¶
func (p *Blockquote) PreviousLineType() PreviousLineType
func (*Blockquote) RemoveChild ¶
func (*Blockquote) RemoveChildren ¶
func (c *Blockquote) RemoveChildren(nodes ...Node)
func (*Blockquote) ReplaceChild ¶
func (*Blockquote) SetChildren ¶
func (c *Blockquote) SetChildren(nodes ...Node)
func (*Blockquote) SetPreviousLineType ¶
func (p *Blockquote) SetPreviousLineType(previousLineType PreviousLineType)
func (*Blockquote) WithPreviousLineType ¶
func (b *Blockquote) WithPreviousLineType(t PreviousLineType) *Blockquote
type Cloze ¶
func NewClozeWithCue ¶
func (*Cloze) NextSibling ¶
func (n *Cloze) NextSibling() Node
func (*Cloze) Parent ¶
func (n *Cloze) Parent() HasChildren
func (*Cloze) PreviousSibling ¶
func (n *Cloze) PreviousSibling() Node
func (*Cloze) RemoveSelf ¶
func (n *Cloze) RemoveSelf()
func (*Cloze) ReplaceWith ¶
func (n *Cloze) ReplaceWith(node Node)
type CodeBlock ¶
type CodeBlock struct { // Language is the programming language of this code block. Language string // Code is the raw value of the code block. Code string // contains filtered or unexported fields }
func NewCodeBlock ¶
func (*CodeBlock) NextSibling ¶
func (n *CodeBlock) NextSibling() Node
func (*CodeBlock) Parent ¶
func (n *CodeBlock) Parent() HasChildren
func (*CodeBlock) PreviousLineType ¶
func (p *CodeBlock) PreviousLineType() PreviousLineType
func (*CodeBlock) PreviousSibling ¶
func (n *CodeBlock) PreviousSibling() Node
func (*CodeBlock) RemoveSelf ¶
func (n *CodeBlock) RemoveSelf()
func (*CodeBlock) ReplaceWith ¶
func (n *CodeBlock) ReplaceWith(node Node)
func (*CodeBlock) SetPreviousLineType ¶
func (p *CodeBlock) SetPreviousLineType(previousLineType PreviousLineType)
func (*CodeBlock) WithLanguage ¶
WithLanguage sets the language of the code block.
func (*CodeBlock) WithPreviousLineType ¶
func (c *CodeBlock) WithPreviousLineType(previousLineType PreviousLineType) *CodeBlock
type CodeSpan ¶
type CodeSpan struct { // Value is the text of this node. Value string // contains filtered or unexported fields }
func NewCodeSpan ¶
func (*CodeSpan) NextSibling ¶
func (n *CodeSpan) NextSibling() Node
func (*CodeSpan) Parent ¶
func (n *CodeSpan) Parent() HasChildren
func (*CodeSpan) PreviousSibling ¶
func (n *CodeSpan) PreviousSibling() Node
func (*CodeSpan) RemoveSelf ¶
func (n *CodeSpan) RemoveSelf()
func (*CodeSpan) ReplaceWith ¶
func (n *CodeSpan) ReplaceWith(node Node)
type Emphasis ¶
type Emphasis struct {
// contains filtered or unexported fields
}
func NewEmphasis ¶
func (*Emphasis) AddChildren ¶
func (c *Emphasis) AddChildren(nodes ...Node)
func (*Emphasis) FirstChild ¶
func (c *Emphasis) FirstChild() Node
func (*Emphasis) InsertChildAfter ¶
func (*Emphasis) InsertChildBefore ¶
func (*Emphasis) PrependChild ¶
func (c *Emphasis) PrependChild(node Node)
func (*Emphasis) PrependChildren ¶
func (c *Emphasis) PrependChildren(nodes ...Node)
func (*Emphasis) RemoveChild ¶
func (*Emphasis) RemoveChildren ¶
func (c *Emphasis) RemoveChildren(nodes ...Node)
func (*Emphasis) ReplaceChild ¶
func (*Emphasis) SetChildren ¶
func (c *Emphasis) SetChildren(nodes ...Node)
type HasChildren ¶
type HasChildren interface { Node // Children gets all the direct children of this node. Children() NodeList // FirstChild gets the first child of this node. Can be nil if there are // no children. Can be the same as LastChild if there is only one child. FirstChild() Node // LastChild gets the last child of this node. Can be nil if there are no // children. Can be the same as FirstChild if there is only one child. LastChild() Node // SetChildren sets the children of this node, this will remove any // existing children. SetChildren(node ...Node) // AddChild adds a child to this node. The child will be added to the end // of the list of children. Nodes can only have one parent, if the node // already has a parent it will be removed from that parent. AddChild(node Node) // AddChildren adds multiple children to this node. The children will be // added to the end of the list of children. Nodes can only have one // parent, if any of the nodes already have a parent they will be removed AddChildren(nodes ...Node) // PrependChild adds a child to the start of this node. Nodes can only // have one parent, if the node already has a parent it will be removed // from that parent. PrependChild(node Node) // PrependChildren adds multiple children to the start of this node. Nodes // can only have one parent, if any of the nodes already have a parent // they will be removed from that parent. PrependChildren(nodes ...Node) // RemoveChild removes a child from this node. Returns true if the child // was removed, false if the child was not a child of this node. RemoveChild(node Node) bool // RemoveChildren removes multiple children from this node. Returns true // if all of the children were removed, false if any of the children were // not a child of this node. RemoveChildren(nodes ...Node) // ReplaceChild replaces a child of this node with another node. Returns // true if the child was replaced, false if the old node was not a child // of this node. ReplaceChild(oldNode Node, newNode Node) bool // InsertChildBefore inserts a node before another node. Returns true if // the node was inserted, false if the before node was not a child of // this node. InsertChildBefore(node Node, before Node) bool // InsertChildBefore inserts a node before another node. Returns true if // the node was inserted, false if the before node was not a child of // this node. InsertChildAfter(node Node, after Node) bool }
type HasLinkURL ¶
HasLinkURL is used for nodes that are links, such as `Link` and `AutoLink`.
type Hashtag ¶
type Hashtag struct { // Page is the target of the link. To string // contains filtered or unexported fields }
func NewHashtag ¶
func (*Hashtag) NextSibling ¶
func (n *Hashtag) NextSibling() Node
func (*Hashtag) Parent ¶
func (n *Hashtag) Parent() HasChildren
func (*Hashtag) PreviousSibling ¶
func (n *Hashtag) PreviousSibling() Node
func (*Hashtag) RemoveSelf ¶
func (n *Hashtag) RemoveSelf()
func (*Hashtag) ReplaceWith ¶
func (n *Hashtag) ReplaceWith(node Node)
type Heading ¶
type Heading struct { // Level is the level of this heading. Level int // contains filtered or unexported fields }
func NewHeading ¶
func (*Heading) AddChildren ¶
func (c *Heading) AddChildren(nodes ...Node)
func (*Heading) FirstChild ¶
func (c *Heading) FirstChild() Node
func (*Heading) InsertChildAfter ¶
func (*Heading) InsertChildBefore ¶
func (*Heading) PrependChild ¶
func (c *Heading) PrependChild(node Node)
func (*Heading) PrependChildren ¶
func (c *Heading) PrependChildren(nodes ...Node)
func (*Heading) RemoveChild ¶
func (*Heading) RemoveChildren ¶
func (c *Heading) RemoveChildren(nodes ...Node)
func (*Heading) ReplaceChild ¶
func (*Heading) SetChildren ¶
func (c *Heading) SetChildren(nodes ...Node)
type Image ¶
type Image struct { // URL is the URL of the image. URL string // Title is the title of the image. Title string // contains filtered or unexported fields }
func (*Image) AddChildren ¶
func (c *Image) AddChildren(nodes ...Node)
func (*Image) FirstChild ¶
func (c *Image) FirstChild() Node
func (*Image) InsertChildAfter ¶
func (*Image) InsertChildBefore ¶
func (*Image) PrependChild ¶
func (c *Image) PrependChild(node Node)
func (*Image) PrependChildren ¶
func (c *Image) PrependChildren(nodes ...Node)
func (*Image) RemoveChild ¶
func (*Image) RemoveChildren ¶
func (c *Image) RemoveChildren(nodes ...Node)
func (*Image) ReplaceChild ¶
func (*Image) SetChildren ¶
func (c *Image) SetChildren(nodes ...Node)
type InlineNode ¶
type InlineNode interface { Node // contains filtered or unexported methods }
type Link ¶
type Link struct { // URL is the target of the link. URL string // Title of this link as displayed on hover in a browser. Title string // contains filtered or unexported fields }
func (*Link) AddChildren ¶
func (c *Link) AddChildren(nodes ...Node)
func (*Link) FirstChild ¶
func (c *Link) FirstChild() Node
func (*Link) InsertChildAfter ¶
func (*Link) InsertChildBefore ¶
func (*Link) PrependChild ¶
func (c *Link) PrependChild(node Node)
func (*Link) PrependChildren ¶
func (c *Link) PrependChildren(nodes ...Node)
func (*Link) RemoveChild ¶
func (*Link) RemoveChildren ¶
func (c *Link) RemoveChildren(nodes ...Node)
func (*Link) ReplaceChild ¶
func (*Link) SetChildren ¶
func (c *Link) SetChildren(nodes ...Node)
type List ¶
type List struct { // Type is the type of the list. Type ListType // Marker is the marker of the list. Marker byte // contains filtered or unexported fields }
func NewListFromMarker ¶
func NewOrderedList ¶
func NewUnorderedList ¶
func (*List) AddChildren ¶
func (c *List) AddChildren(nodes ...Node)
func (*List) FirstChild ¶
func (c *List) FirstChild() Node
func (*List) InsertChildAfter ¶
func (*List) InsertChildBefore ¶
func (*List) PrependChild ¶
func (c *List) PrependChild(node Node)
func (*List) PrependChildren ¶
func (c *List) PrependChildren(nodes ...Node)
func (*List) PreviousLineType ¶
func (p *List) PreviousLineType() PreviousLineType
func (*List) RemoveChild ¶
func (*List) RemoveChildren ¶
func (c *List) RemoveChildren(nodes ...Node)
func (*List) ReplaceChild ¶
func (*List) SetChildren ¶
func (c *List) SetChildren(nodes ...Node)
func (*List) SetPreviousLineType ¶
func (p *List) SetPreviousLineType(previousLineType PreviousLineType)
func (*List) WithMarker ¶
WithMarker sets the marker of the list.
func (*List) WithPreviousLineType ¶
func (c *List) WithPreviousLineType(t PreviousLineType) *List
type ListItem ¶
type ListItem struct {
// contains filtered or unexported fields
}
func NewListItem ¶
func (*ListItem) AddChildren ¶
func (c *ListItem) AddChildren(nodes ...Node)
func (*ListItem) FirstChild ¶
func (c *ListItem) FirstChild() Node
func (*ListItem) InsertChildAfter ¶
func (*ListItem) InsertChildBefore ¶
func (*ListItem) PrependChild ¶
func (c *ListItem) PrependChild(node Node)
func (*ListItem) PrependChildren ¶
func (c *ListItem) PrependChildren(nodes ...Node)
func (*ListItem) RemoveChild ¶
func (*ListItem) RemoveChildren ¶
func (c *ListItem) RemoveChildren(nodes ...Node)
func (*ListItem) ReplaceChild ¶
func (*ListItem) SetChildren ¶
func (c *ListItem) SetChildren(nodes ...Node)
type ListSection ¶
type ListSection struct {
// contains filtered or unexported fields
}
func (*ListSection) AddChildren ¶
func (c *ListSection) AddChildren(nodes ...Node)
func (*ListSection) FirstChild ¶
func (c *ListSection) FirstChild() Node
func (*ListSection) InsertChildAfter ¶
func (*ListSection) InsertChildBefore ¶
func (*ListSection) PrependChild ¶
func (c *ListSection) PrependChild(node Node)
func (*ListSection) PrependChildren ¶
func (c *ListSection) PrependChildren(nodes ...Node)
func (*ListSection) RemoveChild ¶
func (*ListSection) RemoveChildren ¶
func (c *ListSection) RemoveChildren(nodes ...Node)
func (*ListSection) ReplaceChild ¶
func (*ListSection) SetChildren ¶
func (c *ListSection) SetChildren(nodes ...Node)
type Logbook ¶
type Logbook struct {
// contains filtered or unexported fields
}
Logbook represents a logbook of a task. Logseq will manage these automatically when a task changes state. They are used both for tracking if a task has been completed, for use with repeating tasks and for time tracking if the user has enabled that feature.
These are commonly part of a `Block` with a task marker.
A logbook node can only contain children of type `LogbookEntry`.
func NewLogbook ¶
func NewLogbook(entries ...LogbookEntry) *Logbook
func (*Logbook) AddChildren ¶
func (c *Logbook) AddChildren(nodes ...Node)
func (*Logbook) FirstChild ¶
func (c *Logbook) FirstChild() Node
func (*Logbook) InsertChildAfter ¶
func (*Logbook) InsertChildBefore ¶
func (*Logbook) PrependChild ¶
func (c *Logbook) PrependChild(node Node)
func (*Logbook) PrependChildren ¶
func (c *Logbook) PrependChildren(nodes ...Node)
func (*Logbook) PreviousLineType ¶
func (p *Logbook) PreviousLineType() PreviousLineType
func (*Logbook) RemoveChild ¶
func (*Logbook) RemoveChildren ¶
func (c *Logbook) RemoveChildren(nodes ...Node)
func (*Logbook) ReplaceChild ¶
func (*Logbook) SetChildren ¶
func (c *Logbook) SetChildren(nodes ...Node)
func (*Logbook) SetPreviousLineType ¶
func (p *Logbook) SetPreviousLineType(previousLineType PreviousLineType)
func (*Logbook) WithPreviousLineType ¶
func (l *Logbook) WithPreviousLineType(t PreviousLineType) *Logbook
type LogbookEntry ¶
type LogbookEntry interface { Node // contains filtered or unexported methods }
LogbookEntry represents a single entry in a logbook.
type LogbookEntryRaw ¶
type LogbookEntryRaw struct { Value string // contains filtered or unexported fields }
LogbookEntryRaw represents a raw logbook entry, this is used for entries that are not supported by this library.
func NewLogbookEntryRaw ¶
func NewLogbookEntryRaw(value string) *LogbookEntryRaw
func (*LogbookEntryRaw) NextSibling ¶
func (n *LogbookEntryRaw) NextSibling() Node
func (*LogbookEntryRaw) Parent ¶
func (n *LogbookEntryRaw) Parent() HasChildren
func (*LogbookEntryRaw) PreviousSibling ¶
func (n *LogbookEntryRaw) PreviousSibling() Node
func (*LogbookEntryRaw) RemoveSelf ¶
func (n *LogbookEntryRaw) RemoveSelf()
func (*LogbookEntryRaw) ReplaceWith ¶
func (n *LogbookEntryRaw) ReplaceWith(node Node)
func (*LogbookEntryRaw) WithValue ¶
func (t *LogbookEntryRaw) WithValue(value string) *LogbookEntryRaw
WithValue sets the value of the logbook entry.
type Macro ¶
type Macro struct { // Name gets the name of this macro. Name string // Arguments gets the arguments of this macro. Arguments []string // contains filtered or unexported fields }
Macro represents a macro, which in the source is on the form `{{macro-name arg1, arg2, ..., argN}}`.
Macros share their syntax with some built-ins, such as `{{query}}` and `{{embed}}`, but are otherwise user-defined. If a supported built-in is found it will be parsed as its own node type, such as `Query`, `PageEmbed` or `BlockEmbed`.
In Logseq arguments are optional, but must be comma separated. Arguments can be quoted, in which case they can contain commas. In this library arguments will be normalized, if a comma is in the argument it will be quoted in the output.
func (*Macro) NextSibling ¶
func (n *Macro) NextSibling() Node
func (*Macro) Parent ¶
func (n *Macro) Parent() HasChildren
func (*Macro) PreviousSibling ¶
func (n *Macro) PreviousSibling() Node
func (*Macro) RemoveSelf ¶
func (n *Macro) RemoveSelf()
func (*Macro) ReplaceWith ¶
func (n *Macro) ReplaceWith(node Node)
func (*Macro) WithArguments ¶
WithArguments sets the arguments of the macro.
type Node ¶
type Node interface { // Parent gets the parent of this node. Parent() HasChildren // NextSibling gets the next sibling of this node. NextSibling() Node // PreviousSibling gets the previous sibling of this node. PreviousSibling() Node // RemoveSelf this node from its parent. RemoveSelf() // ReplaceWith replaces this node with the given node. ReplaceWith(node Node) // contains filtered or unexported methods }
Node is the basic building block of a document. Nodes represent a single element in the document, such as a paragraph, heading, list or text.
func AddAutomaticParagraphs ¶
AddAutomaticParagraphs wraps all nodes that are not blocks in paragraphs. This enables the user to create nodes without having to think too much about the structure of the document.
type NodeList ¶
type NodeList []Node
func (NodeList) Filter ¶
func (n NodeList) Filter(predicate NodePredicate) NodeList
func (NodeList) FilterDeep ¶
func (n NodeList) FilterDeep(predicate NodePredicate) NodeList
func (NodeList) Find ¶
func (n NodeList) Find(predicate NodePredicate) Node
func (NodeList) FindDeep ¶
func (n NodeList) FindDeep(predicate NodePredicate) Node
type NodePredicate ¶
func IsBoth ¶
func IsBoth(a NodePredicate, b NodePredicate) NodePredicate
func IsEither ¶
func IsEither(a NodePredicate, b NodePredicate) NodePredicate
func IsOfType ¶
func IsOfType[T Node]() NodePredicate
func IsPageReference ¶
func IsPageReference() NodePredicate
type PageEmbed ¶
type PageEmbed struct { To string // contains filtered or unexported fields }
func NewPageEmbed ¶
func (*PageEmbed) NextSibling ¶
func (n *PageEmbed) NextSibling() Node
func (*PageEmbed) Parent ¶
func (n *PageEmbed) Parent() HasChildren
func (*PageEmbed) PreviousSibling ¶
func (n *PageEmbed) PreviousSibling() Node
func (*PageEmbed) RemoveSelf ¶
func (n *PageEmbed) RemoveSelf()
func (*PageEmbed) ReplaceWith ¶
func (n *PageEmbed) ReplaceWith(node Node)
type PageLink ¶
type PageLink struct { // To is the target of the link. To string // contains filtered or unexported fields }
func NewPageLink ¶
func (*PageLink) NextSibling ¶
func (n *PageLink) NextSibling() Node
func (*PageLink) Parent ¶
func (n *PageLink) Parent() HasChildren
func (*PageLink) PreviousSibling ¶
func (n *PageLink) PreviousSibling() Node
func (*PageLink) RemoveSelf ¶
func (n *PageLink) RemoveSelf()
func (*PageLink) ReplaceWith ¶
func (n *PageLink) ReplaceWith(node Node)
type Paragraph ¶
type Paragraph struct {
// contains filtered or unexported fields
}
func NewParagraph ¶
func (*Paragraph) AddChildren ¶
func (c *Paragraph) AddChildren(nodes ...Node)
func (*Paragraph) FirstChild ¶
func (c *Paragraph) FirstChild() Node
func (*Paragraph) InsertChildAfter ¶
func (*Paragraph) InsertChildBefore ¶
func (*Paragraph) PrependChild ¶
func (c *Paragraph) PrependChild(node Node)
func (*Paragraph) PrependChildren ¶
func (c *Paragraph) PrependChildren(nodes ...Node)
func (*Paragraph) PreviousLineType ¶
func (p *Paragraph) PreviousLineType() PreviousLineType
func (*Paragraph) RemoveChild ¶
func (*Paragraph) RemoveChildren ¶
func (c *Paragraph) RemoveChildren(nodes ...Node)
func (*Paragraph) ReplaceChild ¶
func (*Paragraph) SetChildren ¶
func (c *Paragraph) SetChildren(nodes ...Node)
func (*Paragraph) SetPreviousLineType ¶
func (p *Paragraph) SetPreviousLineType(previousLineType PreviousLineType)
func (*Paragraph) WithPreviousLineType ¶
func (p *Paragraph) WithPreviousLineType(t PreviousLineType) *Paragraph
type PreviousLineAware ¶
type PreviousLineAware interface { // PreviousLineType gets the type of the previous line. PreviousLineType() PreviousLineType // SetPreviousLineType sets the type of the previous line. SetPreviousLineType(PreviousLineType) }
PreviousLineAware is an interface that can be implemented by block nodes to get information about the previous line.
This information is used when generating Markdown output to keep the Markdown close to the original input.
Most implementations of this interface are encouraged to also provide a helper method `WithPreviousLineType` that sets the previous line type and returns the node.
type PreviousLineType ¶
type PreviousLineType int
PreviousLineType contains information about the previous line, commonly saved while parsing.
const ( // PreviousLineTypeAutomatic is the default value, which lets block nodes // pick what kind of previous line type they want. PreviousLineTypeAutomatic PreviousLineType = iota // PreviousLineTypeBlank is used when the previous line was blank. PreviousLineTypeBlank // PreviousLineTypeNonBlank is used when the previous line was not blank. // Such as when something interrupts as paragraph. PreviousLineTypeNonBlank )
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
Properties is a collection of Property nodes.
func NewProperties ¶
func NewProperties(children ...*Property) *Properties
NewProperties creates a new Properties node with the given Property children.
func (*Properties) AddChildren ¶
func (c *Properties) AddChildren(nodes ...Node)
func (*Properties) FirstChild ¶
func (c *Properties) FirstChild() Node
func (*Properties) Get ¶
func (p *Properties) Get(key string) NodeList
Get gets the value of a Property by name. Will return an empty slice if no Property with the given name exists.
func (*Properties) GetAsNode ¶
func (p *Properties) GetAsNode(key string) *Property
GetAsNode gets a Property node by name. Will return nil if no Property with the given name exists.
func (*Properties) InsertChildAfter ¶
func (*Properties) InsertChildBefore ¶
func (*Properties) PrependChild ¶
func (c *Properties) PrependChild(node Node)
func (*Properties) PrependChildren ¶
func (c *Properties) PrependChildren(nodes ...Node)
func (*Properties) PreviousLineType ¶
func (p *Properties) PreviousLineType() PreviousLineType
func (*Properties) Remove ¶
func (p *Properties) Remove(key string)
Remove a Property node by name. If a Property with the given name does not exist this does nothing.
func (*Properties) RemoveChild ¶
func (*Properties) RemoveChildren ¶
func (c *Properties) RemoveChildren(nodes ...Node)
func (*Properties) ReplaceChild ¶
func (*Properties) Set ¶
func (p *Properties) Set(key string, nodes ...Node)
Set a Property node by name. If a Property with the given name already exists, it will be replaced.
func (*Properties) SetChildren ¶
func (c *Properties) SetChildren(nodes ...Node)
func (*Properties) SetPreviousLineType ¶
func (p *Properties) SetPreviousLineType(previousLineType PreviousLineType)
func (*Properties) WithPreviousLineType ¶
func (p *Properties) WithPreviousLineType(t PreviousLineType) *Properties
type Property ¶
type Property struct { // Name is the name of the property. Name string // contains filtered or unexported fields }
Property is a node that represents a property, which is a key that can have multiple values.
func NewProperty ¶
NewProperty creates a new Property node with the given name and values.
func (*Property) AddChildren ¶
func (c *Property) AddChildren(nodes ...Node)
func (*Property) FirstChild ¶
func (c *Property) FirstChild() Node
func (*Property) InsertChildAfter ¶
func (*Property) InsertChildBefore ¶
func (*Property) PrependChild ¶
func (c *Property) PrependChild(node Node)
func (*Property) PrependChildren ¶
func (c *Property) PrependChildren(nodes ...Node)
func (*Property) RemoveChild ¶
func (*Property) RemoveChildren ¶
func (c *Property) RemoveChildren(nodes ...Node)
func (*Property) ReplaceChild ¶
func (*Property) SetChildren ¶
func (c *Property) SetChildren(nodes ...Node)
type Query ¶
type Query struct { Query string // contains filtered or unexported fields }
Query represents a simple query in the source, on the form `{{query datalog query}}`.
func (*Query) NextSibling ¶
func (n *Query) NextSibling() Node
func (*Query) Parent ¶
func (n *Query) Parent() HasChildren
func (*Query) PreviousSibling ¶
func (n *Query) PreviousSibling() Node
func (*Query) RemoveSelf ¶
func (n *Query) RemoveSelf()
func (*Query) ReplaceWith ¶
func (n *Query) ReplaceWith(node Node)
type QueryCommand ¶
type QueryCommand struct { Query string // contains filtered or unexported fields }
QueryCommand is a command represented by #+BEGIN_QUERY..#+END_QUERY in a block.
func NewQueryCommand ¶
func NewQueryCommand(query string) *QueryCommand
func (*QueryCommand) NextSibling ¶
func (n *QueryCommand) NextSibling() Node
func (*QueryCommand) Parent ¶
func (n *QueryCommand) Parent() HasChildren
func (*QueryCommand) PreviousSibling ¶
func (n *QueryCommand) PreviousSibling() Node
func (*QueryCommand) RemoveSelf ¶
func (n *QueryCommand) RemoveSelf()
func (*QueryCommand) ReplaceWith ¶
func (n *QueryCommand) ReplaceWith(node Node)
func (*QueryCommand) WithQuery ¶
func (h *QueryCommand) WithQuery(query string) *QueryCommand
WithQuery sets the query for the command.
type QuoteCommand ¶
type QuoteCommand struct { Quote string // contains filtered or unexported fields }
QuoteCommand is a command represented by #+BEGIN_QUOTE..#+END_QUOTE in a block.
func (*QuoteCommand) NextSibling ¶
func (n *QuoteCommand) NextSibling() Node
func (*QuoteCommand) Parent ¶
func (n *QuoteCommand) Parent() HasChildren
func (*QuoteCommand) PreviousSibling ¶
func (n *QuoteCommand) PreviousSibling() Node
func (*QuoteCommand) RemoveSelf ¶
func (n *QuoteCommand) RemoveSelf()
func (*QuoteCommand) ReplaceWith ¶
func (n *QuoteCommand) ReplaceWith(node Node)
type RawHTML ¶
type RawHTML struct { // HTML is the HTML of this node. HTML string // contains filtered or unexported fields }
func NewRawHTML ¶
func (*RawHTML) NextSibling ¶
func (n *RawHTML) NextSibling() Node
func (*RawHTML) Parent ¶
func (n *RawHTML) Parent() HasChildren
func (*RawHTML) PreviousSibling ¶
func (n *RawHTML) PreviousSibling() Node
func (*RawHTML) RemoveSelf ¶
func (n *RawHTML) RemoveSelf()
func (*RawHTML) ReplaceWith ¶
func (n *RawHTML) ReplaceWith(node Node)
type RawHTMLBlock ¶
type RawHTMLBlock struct { // HTML is the HTML of this node. HTML string // contains filtered or unexported fields }
func NewRawHTMLBlock ¶
func NewRawHTMLBlock(html string) *RawHTMLBlock
func (*RawHTMLBlock) NextSibling ¶
func (n *RawHTMLBlock) NextSibling() Node
func (*RawHTMLBlock) Parent ¶
func (n *RawHTMLBlock) Parent() HasChildren
func (*RawHTMLBlock) PreviousSibling ¶
func (n *RawHTMLBlock) PreviousSibling() Node
func (*RawHTMLBlock) RemoveSelf ¶
func (n *RawHTMLBlock) RemoveSelf()
func (*RawHTMLBlock) ReplaceWith ¶
func (n *RawHTMLBlock) ReplaceWith(node Node)
func (*RawHTMLBlock) WithHTML ¶
func (h *RawHTMLBlock) WithHTML(html string) *RawHTMLBlock
WithHTML sets the HTML.
type RawText ¶
type RawText struct { // Value is the text of this node. Value string // contains filtered or unexported fields }
RawText is used to wrap a string of text that should not be processed as Markdown. This is useful for when you want to include pre-generated Markdown.
func NewRawText ¶
func (*RawText) NextSibling ¶
func (n *RawText) NextSibling() Node
func (*RawText) Parent ¶
func (n *RawText) Parent() HasChildren
func (*RawText) PreviousSibling ¶
func (n *RawText) PreviousSibling() Node
func (*RawText) RemoveSelf ¶
func (n *RawText) RemoveSelf()
func (*RawText) ReplaceWith ¶
func (n *RawText) ReplaceWith(node Node)
type Strikethrough ¶
type Strikethrough struct {
// contains filtered or unexported fields
}
func NewStrikethrough ¶
func NewStrikethrough(children ...Node) *Strikethrough
func (*Strikethrough) AddChildren ¶
func (c *Strikethrough) AddChildren(nodes ...Node)
func (*Strikethrough) FirstChild ¶
func (c *Strikethrough) FirstChild() Node
func (*Strikethrough) InsertChildAfter ¶
func (*Strikethrough) InsertChildBefore ¶
func (*Strikethrough) PrependChild ¶
func (c *Strikethrough) PrependChild(node Node)
func (*Strikethrough) PrependChildren ¶
func (c *Strikethrough) PrependChildren(nodes ...Node)
func (*Strikethrough) RemoveChild ¶
func (*Strikethrough) RemoveChildren ¶
func (c *Strikethrough) RemoveChildren(nodes ...Node)
func (*Strikethrough) ReplaceChild ¶
func (*Strikethrough) SetChildren ¶
func (c *Strikethrough) SetChildren(nodes ...Node)
type Strong ¶
type Strong struct {
// contains filtered or unexported fields
}
func (*Strong) AddChildren ¶
func (c *Strong) AddChildren(nodes ...Node)
func (*Strong) FirstChild ¶
func (c *Strong) FirstChild() Node
func (*Strong) InsertChildAfter ¶
func (*Strong) InsertChildBefore ¶
func (*Strong) PrependChild ¶
func (c *Strong) PrependChild(node Node)
func (*Strong) PrependChildren ¶
func (c *Strong) PrependChildren(nodes ...Node)
func (*Strong) RemoveChild ¶
func (*Strong) RemoveChildren ¶
func (c *Strong) RemoveChildren(nodes ...Node)
func (*Strong) ReplaceChild ¶
func (*Strong) SetChildren ¶
func (c *Strong) SetChildren(nodes ...Node)
type TaskMarker ¶
type TaskMarker struct { Status TaskStatus // contains filtered or unexported fields }
func NewTaskMarker ¶
func NewTaskMarker(t TaskStatus) *TaskMarker
func (*TaskMarker) NextSibling ¶
func (n *TaskMarker) NextSibling() Node
func (*TaskMarker) Parent ¶
func (n *TaskMarker) Parent() HasChildren
func (*TaskMarker) PreviousSibling ¶
func (n *TaskMarker) PreviousSibling() Node
func (*TaskMarker) RemoveSelf ¶
func (n *TaskMarker) RemoveSelf()
func (*TaskMarker) ReplaceWith ¶
func (n *TaskMarker) ReplaceWith(node Node)
func (*TaskMarker) WithStatus ¶
func (t *TaskMarker) WithStatus(status TaskStatus) *TaskMarker
WithStatus sets the status of the task marker.
type TaskStatus ¶
type TaskStatus int
TaskStatus is the type of a task.
const ( TaskStatusNone TaskStatus = iota // TaskStatusTodo is a TODO task. TaskStatusTodo // TaskStatusDoing is a DOING task. TaskStatusDoing // TaskStatusDone is a DONE task. TaskStatusDone // TaskStatusLater is a LATER task. TaskStatusLater // TaskStatusNow is a NOW task. TaskStatusNow // TaskStatusCancelled is a CANCELLED task. TaskStatusCancelled // TaskStatusCanceled is a CANCELED task. TaskStatusCanceled // TaskStatusInProgress is a IN-PROGRESS task. TaskStatusInProgress // TaskStatusWait is a WAIT task. TaskStatusWait // TaskStatusWaiting is a WAITING task. TaskStatusWaiting )
type Text ¶
type Text struct { // Value is the text of this node. Value string HardLineBreak bool SoftLineBreak bool // contains filtered or unexported fields }
func (*Text) NextSibling ¶
func (n *Text) NextSibling() Node
func (*Text) Parent ¶
func (n *Text) Parent() HasChildren
func (*Text) PreviousSibling ¶
func (n *Text) PreviousSibling() Node
func (*Text) RemoveSelf ¶
func (n *Text) RemoveSelf()
func (*Text) ReplaceWith ¶
func (n *Text) ReplaceWith(node Node)
func (*Text) WithHardLineBreak ¶
func (*Text) WithNoLineBreak ¶
func (*Text) WithSoftLineBreak ¶
type ThematicBreak ¶
type ThematicBreak struct {
// contains filtered or unexported fields
}
func NewThematicBreak ¶
func NewThematicBreak() *ThematicBreak
func (*ThematicBreak) NextSibling ¶
func (n *ThematicBreak) NextSibling() Node
func (*ThematicBreak) Parent ¶
func (n *ThematicBreak) Parent() HasChildren
func (*ThematicBreak) PreviousSibling ¶
func (n *ThematicBreak) PreviousSibling() Node
func (*ThematicBreak) RemoveSelf ¶
func (n *ThematicBreak) RemoveSelf()
func (*ThematicBreak) ReplaceWith ¶
func (n *ThematicBreak) ReplaceWith(node Node)