asciidoc

package
v1.5.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package asciidoc provides an object model for Asciidoc files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributeAsciiDocString

func AttributeAsciiDocString(val Elements) string

func Describe

func Describe(el Element) string

func DescribeSet

func DescribeSet(el Elements) string

func StringValue

func StringValue(el Element) string

func ValueToString

func ValueToString(e any) string

Types

type Admonition

type Admonition struct {
	AdmonitionType AdmonitionType
	AttributeList
}

func NewAdmonition

func NewAdmonition(admonition AdmonitionType) *Admonition

func (*Admonition) Equals

func (at *Admonition) Equals(e Element) bool

func (Admonition) Type

func (Admonition) Type() ElementType

type AdmonitionType

type AdmonitionType uint8
const (
	AdmonitionTypeNone AdmonitionType = iota
	AdmonitionTypeNote
	AdmonitionTypeTip
	AdmonitionTypeImportant
	AdmonitionTypeCaution
	AdmonitionTypeWarning
)

func (AdmonitionType) Equals

func (at AdmonitionType) Equals(e Element) bool

func (AdmonitionType) Type

func (AdmonitionType) Type() ElementType

type AlchemyEscape

type AlchemyEscape struct {
	Elements
	LineList
	// contains filtered or unexported fields
}

func NewAlchemyEscape

func NewAlchemyEscape() *AlchemyEscape

func (*AlchemyEscape) Equals

func (mlc *AlchemyEscape) Equals(e Element) bool

func (AlchemyEscape) Origin

func (p AlchemyEscape) Origin() (path string, line int)

func (AlchemyEscape) Path

func (p AlchemyEscape) Path() string

func (AlchemyEscape) Position

func (p AlchemyEscape) Position() (line int, column int, offset int)

func (AlchemyEscape) Raw

func (r AlchemyEscape) Raw() string

func (*AlchemyEscape) SetPath

func (p *AlchemyEscape) SetPath(path string)

func (*AlchemyEscape) SetPosition

func (p *AlchemyEscape) SetPosition(line int, column int, offset int)

func (*AlchemyEscape) SetRaw

func (r *AlchemyEscape) SetRaw(s string)

func (AlchemyEscape) Type

func (AlchemyEscape) Type() ElementType

type Anchor

type Anchor struct {
	ID Elements
	Elements
	// contains filtered or unexported fields
}

func NewAnchor

func NewAnchor(id Elements, label Elements) *Anchor

func (Anchor) AttributeType

func (Anchor) AttributeType() AttributeType

func (*Anchor) Equals

func (a *Anchor) Equals(o Element) bool

func (Anchor) Origin

func (p Anchor) Origin() (path string, line int)

func (Anchor) Path

func (p Anchor) Path() string

func (Anchor) Position

func (p Anchor) Position() (line int, column int, offset int)

func (Anchor) QuoteType

func (Anchor) QuoteType() AttributeQuoteType

func (*Anchor) SetPath

func (p *Anchor) SetPath(path string)

func (*Anchor) SetPosition

func (p *Anchor) SetPosition(line int, column int, offset int)

func (Anchor) Type

func (Anchor) Type() ElementType

type AnchorAttribute

type AnchorAttribute struct {
	ID    Elements `json:"id"`
	Label Elements
	// contains filtered or unexported fields
}

func NewAnchorAttribute

func NewAnchorAttribute(id Elements, label Elements) *AnchorAttribute

func (*AnchorAttribute) AsciiDocString

func (aa *AnchorAttribute) AsciiDocString() string

func (AnchorAttribute) AttributeType

func (AnchorAttribute) AttributeType() AttributeType

func (*AnchorAttribute) Equals

func (aa *AnchorAttribute) Equals(o Attribute) bool

func (AnchorAttribute) QuoteType

func (AnchorAttribute) QuoteType() AttributeQuoteType

func (*AnchorAttribute) SetValue

func (aa *AnchorAttribute) SetValue(v any) error

func (*AnchorAttribute) Traverse added in v1.5.41

func (aa *AnchorAttribute) Traverse(parent Parent) iter.Seq2[Parent, Parent]

func (AnchorAttribute) Type

func (ae AnchorAttribute) Type() ElementType

func (*AnchorAttribute) Value

func (aa *AnchorAttribute) Value() any

type Attributable

type Attributable interface {
	Attributes() []Attribute
	GetAttributeByName(name AttributeName) *NamedAttribute
	SetAttribute(name AttributeName, value Elements)
	SetAttributes(as ...Attribute)
	DeleteAttribute(name AttributeName)
	AppendAttribute(as ...Attribute)
	ReadAttributes(el Element, as ...Attribute) error
}

type AttributableElement

type AttributableElement interface {
	Element
	Attributable
}

type Attribute

type Attribute interface {
	HasPosition
	Value() any
	SetValue(any) error
	AsciiDocString() string
	Equals(o Attribute) bool
	AttributeType() AttributeType
	QuoteType() AttributeQuoteType
}

func NewNamedAttribute

func NewNamedAttribute(name string, value Elements, quoteType AttributeQuoteType) Attribute

func NewPositionalAttribute

func NewPositionalAttribute(value Elements) Attribute

func NewTitleAttribute

func NewTitleAttribute(value Elements) Attribute

type AttributeEntry

type AttributeEntry struct {
	Name AttributeName
	Elements
	// contains filtered or unexported fields
}

func NewAttributeEntry

func NewAttributeEntry(name string) *AttributeEntry

func (*AttributeEntry) Equals

func (uar *AttributeEntry) Equals(e Element) bool

func (AttributeEntry) Origin

func (p AttributeEntry) Origin() (path string, line int)

func (AttributeEntry) Path

func (p AttributeEntry) Path() string

func (AttributeEntry) Position

func (p AttributeEntry) Position() (line int, column int, offset int)

func (AttributeEntry) Raw

func (r AttributeEntry) Raw() string

func (*AttributeEntry) SetPath

func (p *AttributeEntry) SetPath(path string)

func (*AttributeEntry) SetPosition

func (p *AttributeEntry) SetPosition(line int, column int, offset int)

func (*AttributeEntry) SetRaw

func (r *AttributeEntry) SetRaw(s string)

func (AttributeEntry) Type

func (AttributeEntry) Type() ElementType

type AttributeList

type AttributeList []Attribute

func (*AttributeList) AppendAttribute

func (a *AttributeList) AppendAttribute(as ...Attribute)

func (AttributeList) Attributes

func (a AttributeList) Attributes() []Attribute

func (*AttributeList) DeleteAttribute

func (al *AttributeList) DeleteAttribute(name AttributeName)

func (AttributeList) Equals

func (al AttributeList) Equals(oal AttributeList) bool

func (*AttributeList) GetAttributeByName

func (a *AttributeList) GetAttributeByName(name AttributeName) *NamedAttribute

func (*AttributeList) ReadAttributes

func (al *AttributeList) ReadAttributes(el Element, attributes ...Attribute) (err error)

func (AttributeList) SetAttribute

func (al AttributeList) SetAttribute(name AttributeName, value Elements)

func (*AttributeList) SetAttributes

func (a *AttributeList) SetAttributes(as ...Attribute)

type AttributeName

type AttributeName string
const (
	AttributeNameNone          AttributeName = ""
	AttributeNameID            AttributeName = "id"
	AttributeNameColumns       AttributeName = "cols"
	AttributeNameStyle         AttributeName = "style"
	AttributeNameTitle         AttributeName = "title"
	AttributeNameReferenceText AttributeName = "reftext"
	AttributeNameAlternateText AttributeName = "alt"
	AttributeNameHeight        AttributeName = "height"
	AttributeNameWidth         AttributeName = "width"
	AttributeNamePDFWidth      AttributeName = "pdfwidth"
	AttributeNameAlign         AttributeName = "align"
	AttributeNameFloat         AttributeName = "float"
)

type AttributeNames

type AttributeNames []AttributeName

func (AttributeNames) Equals

func (an AttributeNames) Equals(oan AttributeNames) bool

func (AttributeNames) Join

func (an AttributeNames) Join() string

type AttributeQuoteType

type AttributeQuoteType uint8
const (
	AttributeQuoteTypeNone AttributeQuoteType = iota
	AttributeQuoteTypeSingle
	AttributeQuoteTypeDouble
)

type AttributeReference

type AttributeReference interface {
	HasPosition
	Element
	Name() string
}

func NewAttributeReference

func NewAttributeReference(name string) AttributeReference

type AttributeReset

type AttributeReset struct {
	Name AttributeName
	// contains filtered or unexported fields
}

func NewAttributeReset

func NewAttributeReset(name string) *AttributeReset

func (*AttributeReset) Equals

func (uar *AttributeReset) Equals(e Element) bool

func (AttributeReset) Origin

func (p AttributeReset) Origin() (path string, line int)

func (AttributeReset) Path

func (p AttributeReset) Path() string

func (AttributeReset) Position

func (p AttributeReset) Position() (line int, column int, offset int)

func (AttributeReset) Raw

func (r AttributeReset) Raw() string

func (*AttributeReset) SetPath

func (p *AttributeReset) SetPath(path string)

func (*AttributeReset) SetPosition

func (p *AttributeReset) SetPosition(line int, column int, offset int)

func (*AttributeReset) SetRaw

func (r *AttributeReset) SetRaw(s string)

func (AttributeReset) Type

func (AttributeReset) Type() ElementType

type AttributeType

type AttributeType uint8
const (
	AttributeTypeNone AttributeType = iota
	AttributeTypeID
	AttributeTypeStyle
	AttributeTypeRole
	AttributeTypeTitle
	AttributeTypeAlternateText
	AttributeTypeColumns
)

type BlockAttributes

type BlockAttributes struct {
	AttributeList
}

func NewBlockAttributes

func NewBlockAttributes(a AttributeList) *BlockAttributes

func (*BlockAttributes) Equals

func (uar *BlockAttributes) Equals(e Element) bool

func (BlockAttributes) Type

type BlockElement

type BlockElement interface {
	Element
	Attributable
	ParentElement
}

type BlockImage

type BlockImage struct {
	AttributeList

	ImagePath Elements
	// contains filtered or unexported fields
}

func NewBlockImage

func NewBlockImage(path Elements) *BlockImage

func (*BlockImage) Equals

func (a *BlockImage) Equals(o Element) bool

func (BlockImage) Origin

func (p BlockImage) Origin() (path string, line int)

func (BlockImage) Path

func (p BlockImage) Path() string

func (BlockImage) Position

func (p BlockImage) Position() (line int, column int, offset int)

func (BlockImage) Raw

func (r BlockImage) Raw() string

func (*BlockImage) SetPath

func (p *BlockImage) SetPath(path string)

func (*BlockImage) SetPosition

func (p *BlockImage) SetPosition(line int, column int, offset int)

func (*BlockImage) SetRaw

func (r *BlockImage) SetRaw(s string)

func (BlockImage) Type

func (BlockImage) Type() ElementType

type Bold

type Bold struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewBold

func NewBold() *Bold

func (*Bold) Equals

func (b *Bold) Equals(e Element) bool

func (Bold) Origin

func (p Bold) Origin() (path string, line int)

func (Bold) Path

func (p Bold) Path() string

func (Bold) Position

func (p Bold) Position() (line int, column int, offset int)

func (Bold) Raw

func (r Bold) Raw() string

func (*Bold) SetPath

func (p *Bold) SetPath(path string)

func (*Bold) SetPosition

func (p *Bold) SetPosition(line int, column int, offset int)

func (*Bold) SetRaw

func (r *Bold) SetRaw(s string)

func (Bold) TextFormat

func (Bold) TextFormat() TextFormat

func (*Bold) Traverse added in v1.5.41

func (b *Bold) Traverse(parent Parent) iter.Seq2[Parent, Parent]

func (Bold) Type

func (Bold) Type() ElementType

type CharacterReplacementReference

type CharacterReplacementReference UserAttributeReference

func (*CharacterReplacementReference) Equals

func (*CharacterReplacementReference) Name

func (CharacterReplacementReference) ReplacementValue

func (uar CharacterReplacementReference) ReplacementValue() string

func (CharacterReplacementReference) Type

type Checklist

type Checklist int
const (
	ChecklistUnknown Checklist = iota
	ChecklistUnchecked
	ChecklistChecked
)

type ConditionalContext

type ConditionalContext interface {
	IsSet(name string) bool
	Get(name string) any
	Set(name string, value any)
	Unset(name string)
}

type ConditionalOperator

type ConditionalOperator uint8
const (
	ConditionalOperatorNone ConditionalOperator = iota
	ConditionalOperatorEqual
	ConditionalOperatorNotEqual
	ConditionalOperatorLessThan
	ConditionalOperatorLessThanOrEqual
	ConditionalOperatorGreaterThan
	ConditionalOperatorGreaterThanOrEqual
)

func (ConditionalOperator) String

func (co ConditionalOperator) String() string

type ConditionalUnion

type ConditionalUnion uint8
const (
	ConditionalUnionAny ConditionalUnion = iota
	ConditionalUnionAll
)

type Counter

type Counter struct {
	Name         string
	InitialValue string
	Display      bool
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter(name string, initialValue any, display bool) *Counter

func (*Counter) Equals

func (a *Counter) Equals(o Element) bool

func (Counter) Origin

func (p Counter) Origin() (path string, line int)

func (Counter) Path

func (p Counter) Path() string

func (Counter) Position

func (p Counter) Position() (line int, column int, offset int)

func (Counter) Raw

func (r Counter) Raw() string

func (*Counter) SetPath

func (p *Counter) SetPath(path string)

func (*Counter) SetPosition

func (p *Counter) SetPosition(line int, column int, offset int)

func (*Counter) SetRaw

func (r *Counter) SetRaw(s string)

func (Counter) Type

func (Counter) Type() ElementType

type CounterState

type CounterState struct {
	CounterType CounterType
	Value       int
}

type CounterType

type CounterType uint8
const (
	CounterTypeInteger CounterType = iota
	CounterTypeUpperCase
	CounterTypeLowerCase
)

type CrossReference

type CrossReference struct {
	AttributeList
	Elements

	ID     Elements
	Format CrossReferenceFormat
	// contains filtered or unexported fields
}

func NewCrossReference

func NewCrossReference(id Elements, format CrossReferenceFormat) *CrossReference

func (*CrossReference) Equals

func (cr *CrossReference) Equals(o Element) bool

func (CrossReference) Origin

func (p CrossReference) Origin() (path string, line int)

func (CrossReference) Path

func (p CrossReference) Path() string

func (CrossReference) Position

func (p CrossReference) Position() (line int, column int, offset int)

func (CrossReference) Raw

func (r CrossReference) Raw() string

func (*CrossReference) SetPath

func (p *CrossReference) SetPath(path string)

func (*CrossReference) SetPosition

func (p *CrossReference) SetPosition(line int, column int, offset int)

func (*CrossReference) SetRaw

func (r *CrossReference) SetRaw(s string)

func (*CrossReference) Traverse added in v1.5.41

func (cr *CrossReference) Traverse(parent Parent) iter.Seq2[Parent, Parent]

func (CrossReference) Type

func (CrossReference) Type() ElementType

type CrossReferenceFormat

type CrossReferenceFormat uint8
const (
	CrossReferenceFormatNatural CrossReferenceFormat = iota
	CrossReferenceFormatMacro
)

type DelimitedBlockType

type DelimitedBlockType uint8
const (
	DelimitedBlockTypeNone DelimitedBlockType = iota
	DelimitedBlockTypeComment
	DelimitedBlockTypeMultiLineComment
	DelimitedBlockTypeExample
	DelimitedBlockTypeFenced
	DelimitedBlockTypeListing
	DelimitedBlockTypeLiteral
	DelimitedBlockTypeOpen
	DelimitedBlockTypeSidebar
	DelimitedBlockTypeStem
	DelimitedBlockTypeTable
	DelimitedBlockTypeQuote
)

type Delimiter

type Delimiter struct {
	Type   DelimitedBlockType
	Length int
	// contains filtered or unexported fields
}

func (Delimiter) Equals

func (d Delimiter) Equals(od Delimiter) bool

func (Delimiter) Origin

func (p Delimiter) Origin() (path string, line int)

func (Delimiter) Path

func (p Delimiter) Path() string

func (Delimiter) Position

func (p Delimiter) Position() (line int, column int, offset int)

func (Delimiter) Raw

func (r Delimiter) Raw() string

func (*Delimiter) SetPath

func (p *Delimiter) SetPath(path string)

func (*Delimiter) SetPosition

func (p *Delimiter) SetPosition(line int, column int, offset int)

func (*Delimiter) SetRaw

func (r *Delimiter) SetRaw(s string)

type DescriptionListItem

type DescriptionListItem struct {
	Elements
	AttributeList

	Marker string
	Term   Elements
	// contains filtered or unexported fields
}

func NewDescriptionListItem

func NewDescriptionListItem(marker string, term Elements) *DescriptionListItem

func (*DescriptionListItem) Equals

func (a *DescriptionListItem) Equals(o Element) bool

func (DescriptionListItem) Origin

func (p DescriptionListItem) Origin() (path string, line int)

func (DescriptionListItem) Path

func (p DescriptionListItem) Path() string

func (DescriptionListItem) Position

func (p DescriptionListItem) Position() (line int, column int, offset int)

func (DescriptionListItem) Raw

func (r DescriptionListItem) Raw() string

func (*DescriptionListItem) SetPath

func (p *DescriptionListItem) SetPath(path string)

func (*DescriptionListItem) SetPosition

func (p *DescriptionListItem) SetPosition(line int, column int, offset int)

func (*DescriptionListItem) SetRaw

func (r *DescriptionListItem) SetRaw(s string)

func (DescriptionListItem) Type

type Document

type Document struct {
	Elements
}

func (*Document) Equals

func (a *Document) Equals(o Element) bool

func (Document) Type

func (Document) Type() ElementType

type DocumentCrossReference

type DocumentCrossReference struct {
	AttributeList

	ReferencePath Elements
	// contains filtered or unexported fields
}

func NewDocumentCrossReference

func NewDocumentCrossReference(path Elements) *DocumentCrossReference

func (*DocumentCrossReference) Equals

func (dcr *DocumentCrossReference) Equals(o Element) bool

func (DocumentCrossReference) Origin

func (p DocumentCrossReference) Origin() (path string, line int)

func (DocumentCrossReference) Path

func (p DocumentCrossReference) Path() string

func (DocumentCrossReference) Position

func (p DocumentCrossReference) Position() (line int, column int, offset int)

func (DocumentCrossReference) Raw

func (r DocumentCrossReference) Raw() string

func (*DocumentCrossReference) SetPath

func (p *DocumentCrossReference) SetPath(path string)

func (*DocumentCrossReference) SetPosition

func (p *DocumentCrossReference) SetPosition(line int, column int, offset int)

func (*DocumentCrossReference) SetRaw

func (r *DocumentCrossReference) SetRaw(s string)

func (DocumentCrossReference) Type

type DoubleBold

type DoubleBold struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewDoubleBold

func NewDoubleBold() *DoubleBold

func (*DoubleBold) Equals

func (db *DoubleBold) Equals(e Element) bool

func (DoubleBold) Origin

func (p DoubleBold) Origin() (path string, line int)

func (DoubleBold) Path

func (p DoubleBold) Path() string

func (DoubleBold) Position

func (p DoubleBold) Position() (line int, column int, offset int)

func (DoubleBold) Raw

func (r DoubleBold) Raw() string

func (*DoubleBold) SetPath

func (p *DoubleBold) SetPath(path string)

func (*DoubleBold) SetPosition

func (p *DoubleBold) SetPosition(line int, column int, offset int)

func (*DoubleBold) SetRaw

func (r *DoubleBold) SetRaw(s string)

func (DoubleBold) TextFormat

func (DoubleBold) TextFormat() TextFormat

func (*DoubleBold) Traverse added in v1.5.41

func (db *DoubleBold) Traverse(parent Parent) iter.Seq2[Parent, Parent]

func (DoubleBold) Type

func (DoubleBold) Type() ElementType

type DoubleItalic

type DoubleItalic struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewDoubleItalic

func NewDoubleItalic(elements Elements) *DoubleItalic

func (*DoubleItalic) Equals

func (a *DoubleItalic) Equals(o Element) bool

func (DoubleItalic) Origin

func (p DoubleItalic) Origin() (path string, line int)

func (DoubleItalic) Path

func (p DoubleItalic) Path() string

func (DoubleItalic) Position

func (p DoubleItalic) Position() (line int, column int, offset int)

func (DoubleItalic) Raw

func (r DoubleItalic) Raw() string

func (*DoubleItalic) SetPath

func (p *DoubleItalic) SetPath(path string)

func (*DoubleItalic) SetPosition

func (p *DoubleItalic) SetPosition(line int, column int, offset int)

func (*DoubleItalic) SetRaw

func (r *DoubleItalic) SetRaw(s string)

func (DoubleItalic) TextFormat

func (DoubleItalic) TextFormat() TextFormat

func (DoubleItalic) Type

func (DoubleItalic) Type() ElementType

type DoubleMarked

type DoubleMarked struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewDoubleMarked

func NewDoubleMarked() *DoubleMarked

func (*DoubleMarked) Equals

func (b *DoubleMarked) Equals(e Element) bool

func (DoubleMarked) Origin

func (p DoubleMarked) Origin() (path string, line int)

func (DoubleMarked) Path

func (p DoubleMarked) Path() string

func (DoubleMarked) Position

func (p DoubleMarked) Position() (line int, column int, offset int)

func (DoubleMarked) Raw

func (r DoubleMarked) Raw() string

func (*DoubleMarked) SetPath

func (p *DoubleMarked) SetPath(path string)

func (*DoubleMarked) SetPosition

func (p *DoubleMarked) SetPosition(line int, column int, offset int)

func (*DoubleMarked) SetRaw

func (r *DoubleMarked) SetRaw(s string)

func (DoubleMarked) TextFormat

func (DoubleMarked) TextFormat() TextFormat

func (DoubleMarked) Type

func (DoubleMarked) Type() ElementType

type DoubleMonospace

type DoubleMonospace struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewDoubleMonospace

func NewDoubleMonospace(elements Elements) *DoubleMonospace

func (*DoubleMonospace) Equals

func (b *DoubleMonospace) Equals(e Element) bool

func (DoubleMonospace) Origin

func (p DoubleMonospace) Origin() (path string, line int)

func (DoubleMonospace) Path

func (p DoubleMonospace) Path() string

func (DoubleMonospace) Position

func (p DoubleMonospace) Position() (line int, column int, offset int)

func (DoubleMonospace) Raw

func (r DoubleMonospace) Raw() string

func (*DoubleMonospace) SetPath

func (p *DoubleMonospace) SetPath(path string)

func (*DoubleMonospace) SetPosition

func (p *DoubleMonospace) SetPosition(line int, column int, offset int)

func (*DoubleMonospace) SetRaw

func (r *DoubleMonospace) SetRaw(s string)

func (DoubleMonospace) TextFormat

func (DoubleMonospace) TextFormat() TextFormat

func (DoubleMonospace) Type

type Element

type Element interface {
	Type() ElementType
	Equals(o Element) bool
}

type ElementIterator added in v1.5.41

type ElementIterator iter.Seq[Element]

func (ElementIterator) Count added in v1.5.41

func (ei ElementIterator) Count() (count int)

func (ElementIterator) List added in v1.5.41

func (ei ElementIterator) List() (elements Elements)

type ElementType

type ElementType uint8
const (
	ElementTypeUnknown ElementType = iota
	ElementTypeDocument
	ElementTypeBlock
	ElementTypeInline
	ElementTypeInlineLiteral
	ElementTypeAttribute
	ElementTypeAttributes
)

type Elements added in v1.5.41

type Elements []Element

func NewStringElements added in v1.5.41

func NewStringElements(s ...string) (elements Elements)

func (*Elements) Append added in v1.5.41

func (s *Elements) Append(e ...Element)

func (Elements) Children added in v1.5.41

func (s Elements) Children() Elements

func (Elements) Equals added in v1.5.41

func (s Elements) Equals(o Elements) bool

func (Elements) IsWhitespace added in v1.5.41

func (s Elements) IsWhitespace() bool

func (*Elements) SetChildren added in v1.5.41

func (s *Elements) SetChildren(els Elements)

type Email

type Email struct {
	Address string
	// contains filtered or unexported fields
}

func NewEmail

func NewEmail(address string) Email

func (Email) Equals

func (a Email) Equals(o Element) bool

func (Email) Origin

func (p Email) Origin() (path string, line int)

func (Email) Path

func (p Email) Path() string

func (Email) Position

func (p Email) Position() (line int, column int, offset int)

func (Email) Raw

func (r Email) Raw() string

func (*Email) SetPath

func (p *Email) SetPath(path string)

func (*Email) SetPosition

func (p *Email) SetPosition(line int, column int, offset int)

func (*Email) SetRaw

func (r *Email) SetRaw(s string)

func (Email) Type

func (Email) Type() ElementType

type EmptyLine

type EmptyLine struct {
	Text string
	// contains filtered or unexported fields
}

func NewEmptyLine

func NewEmptyLine(text string) *EmptyLine

func (*EmptyLine) Equals

func (a *EmptyLine) Equals(o Element) bool

func (EmptyLine) Origin added in v1.5.40

func (p EmptyLine) Origin() (path string, line int)

func (EmptyLine) Path added in v1.5.40

func (p EmptyLine) Path() string

func (EmptyLine) Position added in v1.5.40

func (p EmptyLine) Position() (line int, column int, offset int)

func (*EmptyLine) SetPath added in v1.5.40

func (p *EmptyLine) SetPath(path string)

func (*EmptyLine) SetPosition added in v1.5.40

func (p *EmptyLine) SetPosition(line int, column int, offset int)

func (*EmptyLine) Type

func (*EmptyLine) Type() ElementType

type EndIf

type EndIf struct {
	Attributes AttributeNames
	Union      ConditionalUnion

	Open Element
	// contains filtered or unexported fields
}

func NewEndIf

func NewEndIf(attributes []AttributeName, union ConditionalUnion) *EndIf

func (*EndIf) Equals

func (a *EndIf) Equals(o Element) bool

func (EndIf) Origin

func (p EndIf) Origin() (path string, line int)

func (EndIf) Path

func (p EndIf) Path() string

func (EndIf) Position

func (p EndIf) Position() (line int, column int, offset int)

func (EndIf) Raw

func (r EndIf) Raw() string

func (*EndIf) SetPath

func (p *EndIf) SetPath(path string)

func (*EndIf) SetPosition

func (p *EndIf) SetPosition(line int, column int, offset int)

func (*EndIf) SetRaw

func (r *EndIf) SetRaw(s string)

func (EndIf) Type

func (EndIf) Type() ElementType

type ExampleBlock

type ExampleBlock struct {
	Delimiter Delimiter
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewExampleBlock

func NewExampleBlock(delimiter Delimiter) *ExampleBlock

func (*ExampleBlock) Equals

func (a *ExampleBlock) Equals(o Element) bool

func (ExampleBlock) Origin

func (p ExampleBlock) Origin() (path string, line int)

func (ExampleBlock) Path

func (p ExampleBlock) Path() string

func (ExampleBlock) Position

func (p ExampleBlock) Position() (line int, column int, offset int)

func (ExampleBlock) Raw

func (r ExampleBlock) Raw() string

func (*ExampleBlock) SetPath

func (p *ExampleBlock) SetPath(path string)

func (*ExampleBlock) SetPosition

func (p *ExampleBlock) SetPosition(line int, column int, offset int)

func (*ExampleBlock) SetRaw

func (r *ExampleBlock) SetRaw(s string)

func (ExampleBlock) Type

func (ExampleBlock) Type() ElementType

type FencedBlock

type FencedBlock struct {
	Delimiter Delimiter
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewFencedBlock

func NewFencedBlock(delimiter Delimiter) *FencedBlock

func (*FencedBlock) Equals

func (a *FencedBlock) Equals(o Element) bool

func (FencedBlock) Origin

func (p FencedBlock) Origin() (path string, line int)

func (FencedBlock) Path

func (p FencedBlock) Path() string

func (FencedBlock) Position

func (p FencedBlock) Position() (line int, column int, offset int)

func (FencedBlock) Raw

func (r FencedBlock) Raw() string

func (*FencedBlock) SetPath

func (p *FencedBlock) SetPath(path string)

func (*FencedBlock) SetPosition

func (p *FencedBlock) SetPosition(line int, column int, offset int)

func (*FencedBlock) SetRaw

func (r *FencedBlock) SetRaw(s string)

func (FencedBlock) Type

func (FencedBlock) Type() ElementType

type FileInclude

type FileInclude struct {
	AttributeList

	Elements
	// contains filtered or unexported fields
}

func NewFileInclude

func NewFileInclude() *FileInclude

func (*FileInclude) Equals

func (a *FileInclude) Equals(o Element) bool

func (FileInclude) Origin

func (p FileInclude) Origin() (path string, line int)

func (FileInclude) Path

func (p FileInclude) Path() string

func (FileInclude) Position

func (p FileInclude) Position() (line int, column int, offset int)

func (FileInclude) Raw

func (r FileInclude) Raw() string

func (*FileInclude) SetPath

func (p *FileInclude) SetPath(path string)

func (*FileInclude) SetPosition

func (p *FileInclude) SetPosition(line int, column int, offset int)

func (*FileInclude) SetRaw

func (r *FileInclude) SetRaw(s string)

func (FileInclude) Type

func (FileInclude) Type() ElementType

type Footnote

type Footnote struct {
	ID    string
	Value any
	// contains filtered or unexported fields
}

func NewFootnote

func NewFootnote(id string, value any) Footnote

func (Footnote) Origin

func (p Footnote) Origin() (path string, line int)

func (Footnote) Path

func (p Footnote) Path() string

func (Footnote) Position

func (p Footnote) Position() (line int, column int, offset int)

func (Footnote) Raw

func (r Footnote) Raw() string

func (*Footnote) SetPath

func (p *Footnote) SetPath(path string)

func (*Footnote) SetPosition

func (p *Footnote) SetPosition(line int, column int, offset int)

func (*Footnote) SetRaw

func (r *Footnote) SetRaw(s string)

type FormattedTextElement

type FormattedTextElement interface {
	Element
	ParentElement
	TextFormat() TextFormat
}

type HasChild

type HasChild interface {
	Child() Element
}

type HasLines

type HasLines interface {
	Element
	Lines() []string
	AppendLine(e string)
	SetLines(e []string)
}

type HasParent

type HasParent interface {
	Parent() Element
	SetParent(e Element)
}

type HasPosition

type HasPosition interface {
	Path() string
	SetPath(path string)
	Position() (line int, column int, offset int)
	SetPosition(line int, column int, offset int)
}

type HasRaw

type HasRaw interface {
	Raw() string
	SetRaw(s string)
}

type Icon

type Icon struct {
	AttributeList

	Path string
	// contains filtered or unexported fields
}

func NewIcon

func NewIcon(path string) *Icon

func (*Icon) Equals

func (a *Icon) Equals(o Element) bool

func (Icon) Origin

func (p Icon) Origin() (path string, line int)

func (Icon) Path

func (p Icon) Path() string

func (Icon) Position

func (p Icon) Position() (line int, column int, offset int)

func (Icon) Raw

func (r Icon) Raw() string

func (*Icon) SetPath

func (p *Icon) SetPath(path string)

func (*Icon) SetPosition

func (p *Icon) SetPosition(line int, column int, offset int)

func (*Icon) SetRaw

func (r *Icon) SetRaw(s string)

func (Icon) Type

func (Icon) Type() ElementType

type IfDef

type IfDef struct {
	Attributes AttributeNames
	Union      ConditionalUnion

	Inline bool
	// contains filtered or unexported fields
}

func NewIfDef

func NewIfDef(attributes []AttributeName, union ConditionalUnion) *IfDef

func (*IfDef) Equals

func (a *IfDef) Equals(o Element) bool

func (*IfDef) Eval

func (a *IfDef) Eval(cc ConditionalContext) bool

func (IfDef) Origin

func (p IfDef) Origin() (path string, line int)

func (IfDef) Path

func (p IfDef) Path() string

func (IfDef) Position

func (p IfDef) Position() (line int, column int, offset int)

func (IfDef) Raw

func (r IfDef) Raw() string

func (*IfDef) SetPath

func (p *IfDef) SetPath(path string)

func (*IfDef) SetPosition

func (p *IfDef) SetPosition(line int, column int, offset int)

func (*IfDef) SetRaw

func (r *IfDef) SetRaw(s string)

func (IfDef) Type

func (IfDef) Type() ElementType

type IfDefBlock

type IfDefBlock struct {
	Attributes AttributeNames
	Elements
	Union ConditionalUnion
	// contains filtered or unexported fields
}

func NewIfDefBlock

func NewIfDefBlock(attributes []AttributeName, union ConditionalUnion) *IfDefBlock

func (*IfDefBlock) Equals

func (a *IfDefBlock) Equals(o Element) bool

func (*IfDefBlock) Eval

func (a *IfDefBlock) Eval(cc ConditionalContext) bool

func (IfDefBlock) Origin

func (p IfDefBlock) Origin() (path string, line int)

func (IfDefBlock) Path

func (p IfDefBlock) Path() string

func (IfDefBlock) Position

func (p IfDefBlock) Position() (line int, column int, offset int)

func (IfDefBlock) Raw

func (r IfDefBlock) Raw() string

func (*IfDefBlock) SetPath

func (p *IfDefBlock) SetPath(path string)

func (*IfDefBlock) SetPosition

func (p *IfDefBlock) SetPosition(line int, column int, offset int)

func (*IfDefBlock) SetRaw

func (r *IfDefBlock) SetRaw(s string)

func (IfDefBlock) Type

func (IfDefBlock) Type() ElementType

type IfEval

type IfEval struct {
	Left     IfEvalValue
	Operator ConditionalOperator
	Right    IfEvalValue

	Inline bool
	// contains filtered or unexported fields
}

func NewIfEval

func NewIfEval(left IfEvalValue, operator ConditionalOperator, right IfEvalValue) *IfEval

func (*IfEval) Equals

func (a *IfEval) Equals(o Element) bool

func (*IfEval) Eval

func (a *IfEval) Eval(cc ConditionalContext) (bool, error)

func (IfEval) Origin

func (p IfEval) Origin() (path string, line int)

func (IfEval) Path

func (p IfEval) Path() string

func (IfEval) Position

func (p IfEval) Position() (line int, column int, offset int)

func (IfEval) Raw

func (r IfEval) Raw() string

func (*IfEval) SetPath

func (p *IfEval) SetPath(path string)

func (*IfEval) SetPosition

func (p *IfEval) SetPosition(line int, column int, offset int)

func (*IfEval) SetRaw

func (r *IfEval) SetRaw(s string)

func (IfEval) Type

func (IfEval) Type() ElementType

type IfEvalBlock

type IfEvalBlock struct {
	Attributes AttributeNames
	Elements

	Left     IfEvalValue
	Operator ConditionalOperator
	Right    IfEvalValue
	// contains filtered or unexported fields
}

func NewIfEvalBlock

func NewIfEvalBlock(left IfEvalValue, operator ConditionalOperator, right IfEvalValue) *IfEvalBlock

func (*IfEvalBlock) Equals

func (a *IfEvalBlock) Equals(o Element) bool

func (*IfEvalBlock) Eval

func (a *IfEvalBlock) Eval(cc ConditionalContext) (bool, error)

func (IfEvalBlock) Origin

func (p IfEvalBlock) Origin() (path string, line int)

func (IfEvalBlock) Path

func (p IfEvalBlock) Path() string

func (IfEvalBlock) Position

func (p IfEvalBlock) Position() (line int, column int, offset int)

func (IfEvalBlock) Raw

func (r IfEvalBlock) Raw() string

func (*IfEvalBlock) SetPath

func (p *IfEvalBlock) SetPath(path string)

func (*IfEvalBlock) SetPosition

func (p *IfEvalBlock) SetPosition(line int, column int, offset int)

func (*IfEvalBlock) SetRaw

func (r *IfEvalBlock) SetRaw(s string)

func (IfEvalBlock) Type

func (IfEvalBlock) Type() ElementType

type IfEvalValue

type IfEvalValue struct {
	Quote AttributeQuoteType
	Value Elements
}

func (IfEvalValue) Equals

func (iev IfEvalValue) Equals(oiev IfEvalValue) bool

func (IfEvalValue) Eval

func (iev IfEvalValue) Eval(cc ConditionalContext) (any, error)

func (IfEvalValue) StringValue

func (iev IfEvalValue) StringValue(cc ConditionalContext) (string, error)

type IfNDef

type IfNDef struct {
	Attributes AttributeNames
	Union      ConditionalUnion

	Inline bool
	// contains filtered or unexported fields
}

func NewIfNDef

func NewIfNDef(attributes []AttributeName, union ConditionalUnion) *IfNDef

func (*IfNDef) Equals

func (a *IfNDef) Equals(o Element) bool

func (*IfNDef) Eval

func (a *IfNDef) Eval(cc ConditionalContext) bool

func (IfNDef) Origin

func (p IfNDef) Origin() (path string, line int)

func (IfNDef) Path

func (p IfNDef) Path() string

func (IfNDef) Position

func (p IfNDef) Position() (line int, column int, offset int)

func (IfNDef) Raw

func (r IfNDef) Raw() string

func (*IfNDef) SetPath

func (p *IfNDef) SetPath(path string)

func (*IfNDef) SetPosition

func (p *IfNDef) SetPosition(line int, column int, offset int)

func (*IfNDef) SetRaw

func (r *IfNDef) SetRaw(s string)

func (IfNDef) Type

func (IfNDef) Type() ElementType

type IfNDefBlock

type IfNDefBlock struct {
	Attributes AttributeNames
	Elements
	Union ConditionalUnion
	// contains filtered or unexported fields
}

func NewIfNDefBlock

func NewIfNDefBlock(attributes []AttributeName, union ConditionalUnion) *IfNDefBlock

func (*IfNDefBlock) Equals

func (a *IfNDefBlock) Equals(o Element) bool

func (*IfNDefBlock) Eval

func (a *IfNDefBlock) Eval(cc ConditionalContext) bool

func (IfNDefBlock) Origin

func (p IfNDefBlock) Origin() (path string, line int)

func (IfNDefBlock) Path

func (p IfNDefBlock) Path() string

func (IfNDefBlock) Position

func (p IfNDefBlock) Position() (line int, column int, offset int)

func (IfNDefBlock) Raw

func (r IfNDefBlock) Raw() string

func (*IfNDefBlock) SetPath

func (p *IfNDefBlock) SetPath(path string)

func (*IfNDefBlock) SetPosition

func (p *IfNDefBlock) SetPosition(line int, column int, offset int)

func (*IfNDefBlock) SetRaw

func (r *IfNDefBlock) SetRaw(s string)

func (IfNDefBlock) Type

func (IfNDefBlock) Type() ElementType

type InlineDoublePassthrough

type InlineDoublePassthrough struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewInlineDoublePassthrough

func NewInlineDoublePassthrough() *InlineDoublePassthrough

func (*InlineDoublePassthrough) Equals

func (a *InlineDoublePassthrough) Equals(o Element) bool

func (InlineDoublePassthrough) Origin

func (p InlineDoublePassthrough) Origin() (path string, line int)

func (InlineDoublePassthrough) Path

func (p InlineDoublePassthrough) Path() string

func (InlineDoublePassthrough) Position

func (p InlineDoublePassthrough) Position() (line int, column int, offset int)

func (InlineDoublePassthrough) Raw

func (r InlineDoublePassthrough) Raw() string

func (*InlineDoublePassthrough) SetPath

func (p *InlineDoublePassthrough) SetPath(path string)

func (*InlineDoublePassthrough) SetPosition

func (p *InlineDoublePassthrough) SetPosition(line int, column int, offset int)

func (*InlineDoublePassthrough) SetRaw

func (r *InlineDoublePassthrough) SetRaw(s string)

func (InlineDoublePassthrough) Type

type InlineIfDef

type InlineIfDef struct {
	Elements

	Attributes AttributeNames
	Union      ConditionalUnion
	// contains filtered or unexported fields
}

func NewInlineIfDef

func NewInlineIfDef(attributes []AttributeName, union ConditionalUnion) *InlineIfDef

func (*InlineIfDef) Equals

func (a *InlineIfDef) Equals(o Element) bool

func (*InlineIfDef) Eval

func (a *InlineIfDef) Eval(cc ConditionalContext) bool

func (InlineIfDef) Origin

func (p InlineIfDef) Origin() (path string, line int)

func (InlineIfDef) Path

func (p InlineIfDef) Path() string

func (InlineIfDef) Position

func (p InlineIfDef) Position() (line int, column int, offset int)

func (InlineIfDef) Raw

func (r InlineIfDef) Raw() string

func (*InlineIfDef) SetPath

func (p *InlineIfDef) SetPath(path string)

func (*InlineIfDef) SetPosition

func (p *InlineIfDef) SetPosition(line int, column int, offset int)

func (*InlineIfDef) SetRaw

func (r *InlineIfDef) SetRaw(s string)

func (InlineIfDef) Type

func (InlineIfDef) Type() ElementType

type InlineIfNDef

type InlineIfNDef struct {
	Elements

	Attributes AttributeNames
	Union      ConditionalUnion
	// contains filtered or unexported fields
}

func NewInlineIfNDef

func NewInlineIfNDef(attributes []AttributeName, union ConditionalUnion) *InlineIfNDef

func (*InlineIfNDef) Equals

func (a *InlineIfNDef) Equals(o Element) bool

func (*InlineIfNDef) Eval

func (a *InlineIfNDef) Eval(cc ConditionalContext) bool

func (InlineIfNDef) Origin

func (p InlineIfNDef) Origin() (path string, line int)

func (InlineIfNDef) Path

func (p InlineIfNDef) Path() string

func (InlineIfNDef) Position

func (p InlineIfNDef) Position() (line int, column int, offset int)

func (InlineIfNDef) Raw

func (r InlineIfNDef) Raw() string

func (*InlineIfNDef) SetPath

func (p *InlineIfNDef) SetPath(path string)

func (*InlineIfNDef) SetPosition

func (p *InlineIfNDef) SetPosition(line int, column int, offset int)

func (*InlineIfNDef) SetRaw

func (r *InlineIfNDef) SetRaw(s string)

func (InlineIfNDef) Type

func (InlineIfNDef) Type() ElementType

type InlineImage

type InlineImage struct {
	AttributeList

	ImagePath Elements
}

func NewInlineImage

func NewInlineImage(path Elements) *InlineImage

func (*InlineImage) Equals

func (a *InlineImage) Equals(o Element) bool

func (InlineImage) Type

func (InlineImage) Type() ElementType

type InlinePassthrough

type InlinePassthrough struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewInlinePassthrough

func NewInlinePassthrough() *InlinePassthrough

func (*InlinePassthrough) Equals

func (a *InlinePassthrough) Equals(o Element) bool

func (InlinePassthrough) Origin

func (p InlinePassthrough) Origin() (path string, line int)

func (InlinePassthrough) Path

func (p InlinePassthrough) Path() string

func (InlinePassthrough) Position

func (p InlinePassthrough) Position() (line int, column int, offset int)

func (InlinePassthrough) Raw

func (r InlinePassthrough) Raw() string

func (*InlinePassthrough) SetPath

func (p *InlinePassthrough) SetPath(path string)

func (*InlinePassthrough) SetPosition

func (p *InlinePassthrough) SetPosition(line int, column int, offset int)

func (*InlinePassthrough) SetRaw

func (r *InlinePassthrough) SetRaw(s string)

func (InlinePassthrough) Type

type Italic

type Italic struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewItalic

func NewItalic(elements Elements) *Italic

func (*Italic) Equals

func (a *Italic) Equals(o Element) bool

func (Italic) Origin

func (p Italic) Origin() (path string, line int)

func (Italic) Path

func (p Italic) Path() string

func (Italic) Position

func (p Italic) Position() (line int, column int, offset int)

func (Italic) Raw

func (r Italic) Raw() string

func (*Italic) SetPath

func (p *Italic) SetPath(path string)

func (*Italic) SetPosition

func (p *Italic) SetPosition(line int, column int, offset int)

func (*Italic) SetRaw

func (r *Italic) SetRaw(s string)

func (Italic) TextFormat

func (Italic) TextFormat() TextFormat

func (Italic) Type

func (Italic) Type() ElementType

type LineBreak

type LineBreak struct {
	// contains filtered or unexported fields
}

func (*LineBreak) Equals

func (*LineBreak) Equals(e Element) bool

func (LineBreak) Origin

func (p LineBreak) Origin() (path string, line int)

func (LineBreak) Path

func (p LineBreak) Path() string

func (LineBreak) Position

func (p LineBreak) Position() (line int, column int, offset int)

func (LineBreak) Raw

func (r LineBreak) Raw() string

func (*LineBreak) SetPath

func (p *LineBreak) SetPath(path string)

func (*LineBreak) SetPosition

func (p *LineBreak) SetPosition(line int, column int, offset int)

func (*LineBreak) SetRaw

func (r *LineBreak) SetRaw(s string)

func (LineBreak) Type

func (LineBreak) Type() ElementType

type LineContinuation

type LineContinuation struct {
	// contains filtered or unexported fields
}

func (LineContinuation) Equals

func (LineContinuation) Equals(e Element) bool

func (LineContinuation) Origin

func (p LineContinuation) Origin() (path string, line int)

func (LineContinuation) Path

func (p LineContinuation) Path() string

func (LineContinuation) Position

func (p LineContinuation) Position() (line int, column int, offset int)

func (LineContinuation) Raw

func (r LineContinuation) Raw() string

func (*LineContinuation) SetPath

func (p *LineContinuation) SetPath(path string)

func (*LineContinuation) SetPosition

func (p *LineContinuation) SetPosition(line int, column int, offset int)

func (*LineContinuation) SetRaw

func (r *LineContinuation) SetRaw(s string)

func (LineContinuation) Type

type LineList

type LineList []string

func (*LineList) AppendLine

func (s *LineList) AppendLine(e string)

func (LineList) Equals

func (s LineList) Equals(oll LineList) bool

func (LineList) Lines

func (s LineList) Lines() []string

func (*LineList) SetLines

func (s *LineList) SetLines(els []string)
type Link struct {
	AttributeList

	URL URL
	// contains filtered or unexported fields
}
func NewLink(url URL) *Link

func (*Link) Equals

func (a *Link) Equals(o Element) bool

func (Link) Origin

func (p Link) Origin() (path string, line int)

func (Link) Path

func (p Link) Path() string

func (Link) Position

func (p Link) Position() (line int, column int, offset int)

func (Link) Raw

func (r Link) Raw() string

func (*Link) SetPath

func (p *Link) SetPath(path string)

func (*Link) SetPosition

func (p *Link) SetPosition(line int, column int, offset int)

func (*Link) SetRaw

func (r *Link) SetRaw(s string)

func (Link) Type

func (Link) Type() ElementType

type LinkMacro

type LinkMacro struct {
	AttributeList

	URL URL
	// contains filtered or unexported fields
}

func NewLinkMacro

func NewLinkMacro(url URL) *LinkMacro

func (*LinkMacro) Equals

func (a *LinkMacro) Equals(o Element) bool

func (LinkMacro) Origin

func (p LinkMacro) Origin() (path string, line int)

func (LinkMacro) Path

func (p LinkMacro) Path() string

func (LinkMacro) Position

func (p LinkMacro) Position() (line int, column int, offset int)

func (LinkMacro) Raw

func (r LinkMacro) Raw() string

func (*LinkMacro) SetPath

func (p *LinkMacro) SetPath(path string)

func (*LinkMacro) SetPosition

func (p *LinkMacro) SetPosition(line int, column int, offset int)

func (*LinkMacro) SetRaw

func (r *LinkMacro) SetRaw(s string)

func (LinkMacro) Type

func (LinkMacro) Type() ElementType

type ListContinuation

type ListContinuation struct {
	NewLineCount int
	ChildElement Element
	// contains filtered or unexported fields
}

func NewListContinuation

func NewListContinuation(child Element, newLineCount int) *ListContinuation

func (*ListContinuation) Child

func (s *ListContinuation) Child() Element

func (*ListContinuation) Equals

func (a *ListContinuation) Equals(o Element) bool

func (ListContinuation) Origin

func (p ListContinuation) Origin() (path string, line int)

func (ListContinuation) Path

func (p ListContinuation) Path() string

func (ListContinuation) Position

func (p ListContinuation) Position() (line int, column int, offset int)

func (ListContinuation) Raw

func (r ListContinuation) Raw() string

func (*ListContinuation) SetPath

func (p *ListContinuation) SetPath(path string)

func (*ListContinuation) SetPosition

func (p *ListContinuation) SetPosition(line int, column int, offset int)

func (*ListContinuation) SetRaw

func (r *ListContinuation) SetRaw(s string)

func (ListContinuation) Type

type Listing

type Listing struct {
	AttributeList

	Delimiter Delimiter
	LineList
	// contains filtered or unexported fields
}

func NewListing

func NewListing(delimiter Delimiter) *Listing

func (*Listing) Equals

func (a *Listing) Equals(o Element) bool

func (Listing) Origin

func (p Listing) Origin() (path string, line int)

func (Listing) Path

func (p Listing) Path() string

func (Listing) Position

func (p Listing) Position() (line int, column int, offset int)

func (Listing) Raw

func (r Listing) Raw() string

func (*Listing) SetPath

func (p *Listing) SetPath(path string)

func (*Listing) SetPosition

func (p *Listing) SetPosition(line int, column int, offset int)

func (*Listing) SetRaw

func (r *Listing) SetRaw(s string)

func (Listing) Type

func (Listing) Type() ElementType

type LiteralBlock

type LiteralBlock struct {
	AttributeList

	Delimiter Delimiter
	LineList
	// contains filtered or unexported fields
}

func NewLiteralBlock

func NewLiteralBlock(delimiter Delimiter) *LiteralBlock

func (*LiteralBlock) Equals

func (a *LiteralBlock) Equals(o Element) bool

func (LiteralBlock) Origin

func (p LiteralBlock) Origin() (path string, line int)

func (LiteralBlock) Path

func (p LiteralBlock) Path() string

func (LiteralBlock) Position

func (p LiteralBlock) Position() (line int, column int, offset int)

func (LiteralBlock) Raw

func (r LiteralBlock) Raw() string

func (*LiteralBlock) SetPath

func (p *LiteralBlock) SetPath(path string)

func (*LiteralBlock) SetPosition

func (p *LiteralBlock) SetPosition(line int, column int, offset int)

func (*LiteralBlock) SetRaw

func (r *LiteralBlock) SetRaw(s string)

func (LiteralBlock) Type

func (LiteralBlock) Type() ElementType

type Marked

type Marked struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewMarked

func NewMarked() *Marked

func (*Marked) Equals

func (b *Marked) Equals(e Element) bool

func (Marked) Origin

func (p Marked) Origin() (path string, line int)

func (Marked) Path

func (p Marked) Path() string

func (Marked) Position

func (p Marked) Position() (line int, column int, offset int)

func (Marked) Raw

func (r Marked) Raw() string

func (*Marked) SetPath

func (p *Marked) SetPath(path string)

func (*Marked) SetPosition

func (p *Marked) SetPosition(line int, column int, offset int)

func (*Marked) SetRaw

func (r *Marked) SetRaw(s string)

func (Marked) TextFormat

func (Marked) TextFormat() TextFormat

func (Marked) Type

func (Marked) Type() ElementType

type Monospace

type Monospace struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewMonospace

func NewMonospace(elements Elements) *Monospace

func (*Monospace) Equals

func (b *Monospace) Equals(e Element) bool

func (Monospace) Origin

func (p Monospace) Origin() (path string, line int)

func (Monospace) Path

func (p Monospace) Path() string

func (Monospace) Position

func (p Monospace) Position() (line int, column int, offset int)

func (Monospace) Raw

func (r Monospace) Raw() string

func (*Monospace) SetPath

func (p *Monospace) SetPath(path string)

func (*Monospace) SetPosition

func (p *Monospace) SetPosition(line int, column int, offset int)

func (*Monospace) SetRaw

func (r *Monospace) SetRaw(s string)

func (Monospace) TextFormat

func (Monospace) TextFormat() TextFormat

func (Monospace) Type

func (Monospace) Type() ElementType

type MultiLineComment

type MultiLineComment struct {
	Delimiter Delimiter
	LineList
	// contains filtered or unexported fields
}

func NewMultiLineComment

func NewMultiLineComment(delimiter Delimiter) *MultiLineComment

func (*MultiLineComment) Equals

func (mlc *MultiLineComment) Equals(e Element) bool

func (MultiLineComment) Origin

func (p MultiLineComment) Origin() (path string, line int)

func (MultiLineComment) Path

func (p MultiLineComment) Path() string

func (MultiLineComment) Position

func (p MultiLineComment) Position() (line int, column int, offset int)

func (MultiLineComment) Raw

func (r MultiLineComment) Raw() string

func (*MultiLineComment) SetPath

func (p *MultiLineComment) SetPath(path string)

func (*MultiLineComment) SetPosition

func (p *MultiLineComment) SetPosition(line int, column int, offset int)

func (*MultiLineComment) SetRaw

func (r *MultiLineComment) SetRaw(s string)

func (MultiLineComment) Type

type NamedAttribute

type NamedAttribute struct {
	Name AttributeName

	Val Elements

	Quote AttributeQuoteType
	// contains filtered or unexported fields
}

func (*NamedAttribute) AsciiDocString

func (na *NamedAttribute) AsciiDocString() string

func (*NamedAttribute) AttributeType

func (na *NamedAttribute) AttributeType() AttributeType

func (*NamedAttribute) Children added in v1.5.41

func (na *NamedAttribute) Children() Elements

func (*NamedAttribute) Equals

func (na *NamedAttribute) Equals(oa Attribute) bool

func (*NamedAttribute) QuoteType

func (na *NamedAttribute) QuoteType() AttributeQuoteType

func (*NamedAttribute) SetChildren added in v1.5.41

func (na *NamedAttribute) SetChildren(els Elements)

func (*NamedAttribute) SetValue

func (na *NamedAttribute) SetValue(v any) error

func (NamedAttribute) Type

func (ae NamedAttribute) Type() ElementType

func (*NamedAttribute) Value

func (na *NamedAttribute) Value() any

type NewLine

type NewLine struct {
	// contains filtered or unexported fields
}

func (*NewLine) Equals

func (*NewLine) Equals(e Element) bool

func (NewLine) Origin

func (p NewLine) Origin() (path string, line int)

func (NewLine) Path

func (p NewLine) Path() string

func (NewLine) Position

func (p NewLine) Position() (line int, column int, offset int)

func (NewLine) Raw

func (r NewLine) Raw() string

func (*NewLine) SetPath

func (p *NewLine) SetPath(path string)

func (*NewLine) SetPosition

func (p *NewLine) SetPosition(line int, column int, offset int)

func (*NewLine) SetRaw

func (r *NewLine) SetRaw(s string)

func (NewLine) Type

func (NewLine) Type() ElementType

type OpenBlock

type OpenBlock struct {
	AttributeList

	Delimiter Delimiter
	Elements
	// contains filtered or unexported fields
}

func NewOpenBlock

func NewOpenBlock(delimiter Delimiter) *OpenBlock

func (*OpenBlock) Equals

func (a *OpenBlock) Equals(o Element) bool

func (OpenBlock) Origin

func (p OpenBlock) Origin() (path string, line int)

func (OpenBlock) Path

func (p OpenBlock) Path() string

func (OpenBlock) Position

func (p OpenBlock) Position() (line int, column int, offset int)

func (OpenBlock) Raw

func (r OpenBlock) Raw() string

func (*OpenBlock) SetPath

func (p *OpenBlock) SetPath(path string)

func (*OpenBlock) SetPosition

func (p *OpenBlock) SetPosition(line int, column int, offset int)

func (*OpenBlock) SetRaw

func (r *OpenBlock) SetRaw(s string)

func (OpenBlock) Type

func (OpenBlock) Type() ElementType

type Optional

type Optional[T comparable] struct {
	Value T
	IsSet bool
}

func Default

func Default[T comparable](val T) Optional[T]

func Maybe

func Maybe[T comparable](val any, defaulValue T) Optional[T]

func One

func One[T comparable](val T) Optional[T]

func (Optional[T]) Equals

func (o Optional[T]) Equals(o2 Optional[T]) bool

type OrderedListItem

type OrderedListItem struct {
	Elements
	AttributeList

	Indent string
	Marker string
	// contains filtered or unexported fields
}

func NewOrderedListItem

func NewOrderedListItem(indent string, marker string) *OrderedListItem

func (*OrderedListItem) Equals

func (a *OrderedListItem) Equals(o Element) bool

func (OrderedListItem) Origin

func (p OrderedListItem) Origin() (path string, line int)

func (OrderedListItem) Path

func (p OrderedListItem) Path() string

func (OrderedListItem) Position

func (p OrderedListItem) Position() (line int, column int, offset int)

func (OrderedListItem) Raw

func (r OrderedListItem) Raw() string

func (*OrderedListItem) SetPath

func (p *OrderedListItem) SetPath(path string)

func (*OrderedListItem) SetPosition

func (p *OrderedListItem) SetPosition(line int, column int, offset int)

func (*OrderedListItem) SetRaw

func (r *OrderedListItem) SetRaw(s string)

func (OrderedListItem) Type

type PageBreak

type PageBreak struct {
	AttributeList
	// contains filtered or unexported fields
}

func NewPageBreak

func NewPageBreak() *PageBreak

func (*PageBreak) Equals

func (pb *PageBreak) Equals(e Element) bool

func (PageBreak) Origin

func (p PageBreak) Origin() (path string, line int)

func (PageBreak) Path

func (p PageBreak) Path() string

func (PageBreak) Position

func (p PageBreak) Position() (line int, column int, offset int)

func (PageBreak) Raw

func (r PageBreak) Raw() string

func (*PageBreak) SetPath

func (p *PageBreak) SetPath(path string)

func (*PageBreak) SetPosition

func (p *PageBreak) SetPosition(line int, column int, offset int)

func (*PageBreak) SetRaw

func (r *PageBreak) SetRaw(s string)

func (PageBreak) Type

func (PageBreak) Type() ElementType

type Paragraph

type Paragraph struct {
	AttributeList
	Elements

	Admonition AdmonitionType
	// contains filtered or unexported fields
}

func NewParagraph

func NewParagraph() *Paragraph

func (*Paragraph) Equals

func (a *Paragraph) Equals(o Element) bool

func (Paragraph) Origin

func (p Paragraph) Origin() (path string, line int)

func (Paragraph) Path

func (p Paragraph) Path() string

func (Paragraph) Position

func (p Paragraph) Position() (line int, column int, offset int)

func (*Paragraph) SetPath

func (p *Paragraph) SetPath(path string)

func (*Paragraph) SetPosition

func (p *Paragraph) SetPosition(line int, column int, offset int)

func (Paragraph) Type

func (Paragraph) Type() ElementType

type Parent added in v1.5.41

type Parent interface {
	Children() Elements
	SetChildren(e Elements)
}

type ParentElement added in v1.5.41

type ParentElement interface {
	Element
	Parent
	Append(e ...Element)
}

type Path

type Path struct {
	Absolute string
	Relative string
}

func NewPath

func NewPath(path string, rootPath string) (p Path, err error)

func (Path) Base

func (p Path) Base() string

func (Path) Dir

func (p Path) Dir() string

func (Path) Ext

func (p Path) Ext() string

func (Path) Origin

func (p Path) Origin() (path string, line int)

func (Path) String

func (p Path) String() string

type PositionalAttribute

type PositionalAttribute struct {
	Offset      int
	ImpliedName AttributeName

	Val Elements
	// contains filtered or unexported fields
}

func (*PositionalAttribute) AsciiDocString

func (pa *PositionalAttribute) AsciiDocString() string

func (*PositionalAttribute) AttributeType

func (pa *PositionalAttribute) AttributeType() AttributeType

func (*PositionalAttribute) Children added in v1.5.41

func (pa *PositionalAttribute) Children() Elements

func (*PositionalAttribute) Equals

func (pa *PositionalAttribute) Equals(oa Attribute) bool

func (PositionalAttribute) QuoteType

func (*PositionalAttribute) SetChildren added in v1.5.41

func (pa *PositionalAttribute) SetChildren(els Elements)

func (*PositionalAttribute) SetValue

func (pa *PositionalAttribute) SetValue(v any) error

func (PositionalAttribute) Type

func (ae PositionalAttribute) Type() ElementType

func (*PositionalAttribute) Value

func (pa *PositionalAttribute) Value() any

type QuoteBlock

type QuoteBlock struct {
	Delimiter Delimiter
	AttributeList

	Elements
	// contains filtered or unexported fields
}

func NewQuoteBlock

func NewQuoteBlock(delimiter Delimiter) *QuoteBlock

func (*QuoteBlock) Equals

func (a *QuoteBlock) Equals(o Element) bool

func (QuoteBlock) Origin

func (p QuoteBlock) Origin() (path string, line int)

func (QuoteBlock) Path

func (p QuoteBlock) Path() string

func (QuoteBlock) Position

func (p QuoteBlock) Position() (line int, column int, offset int)

func (QuoteBlock) Raw

func (r QuoteBlock) Raw() string

func (*QuoteBlock) SetPath

func (p *QuoteBlock) SetPath(path string)

func (*QuoteBlock) SetPosition

func (p *QuoteBlock) SetPosition(line int, column int, offset int)

func (*QuoteBlock) SetRaw

func (r *QuoteBlock) SetRaw(s string)

func (QuoteBlock) Type

func (QuoteBlock) Type() ElementType

type Reader

type Reader interface {
	Iterate(parent Parent, elements Elements) ElementIterator
}
var RawReader Reader = &rawReader{}

type Section

type Section struct {
	AttributeList
	Elements

	Title Elements
	Level int
	// contains filtered or unexported fields
}

func NewSection

func NewSection(title Elements, level int) *Section

func (*Section) AddChildSection

func (s *Section) AddChildSection(c *Section)

func (*Section) Equals

func (a *Section) Equals(o Element) bool

func (Section) Name

func (s Section) Name() string

func (Section) Origin

func (p Section) Origin() (path string, line int)

func (Section) Parent

func (c Section) Parent() Element

func (*Section) ParentSection

func (s *Section) ParentSection() *Section

func (Section) Path

func (p Section) Path() string

func (Section) Position

func (p Section) Position() (line int, column int, offset int)

func (Section) Raw

func (r Section) Raw() string

func (*Section) SetParent

func (c *Section) SetParent(e Element)

func (*Section) SetPath

func (p *Section) SetPath(path string)

func (*Section) SetPosition

func (p *Section) SetPosition(line int, column int, offset int)

func (*Section) SetRaw

func (r *Section) SetRaw(s string)

func (*Section) Traverse added in v1.5.41

func (s *Section) Traverse(parent Parent) iter.Seq2[Parent, Parent]

func (Section) Type

func (Section) Type() ElementType

type ShorthandAttribute

type ShorthandAttribute struct {
	Style   *ShorthandStyle
	ID      *ShorthandID
	Roles   []*ShorthandRole
	Options []*ShorthandOption
	// contains filtered or unexported fields
}

func NewShorthandAttribute

func NewShorthandAttribute(style any, values []any) (*ShorthandAttribute, error)

func (*ShorthandAttribute) AsciiDocString

func (na *ShorthandAttribute) AsciiDocString() string

func (ShorthandAttribute) AttributeType

func (ShorthandAttribute) AttributeType() AttributeType

func (*ShorthandAttribute) Equals

func (ta *ShorthandAttribute) Equals(oa Attribute) bool

func (ShorthandAttribute) QuoteType

func (*ShorthandAttribute) SetValue

func (na *ShorthandAttribute) SetValue(v any) error

func (ShorthandAttribute) Type

func (ae ShorthandAttribute) Type() ElementType

func (*ShorthandAttribute) Value

func (ae *ShorthandAttribute) Value() any

type ShorthandID

type ShorthandID struct {
	Elements
	// contains filtered or unexported fields
}

func NewShorthandID

func NewShorthandID(value ...Element) *ShorthandID

func (*ShorthandID) Equals

func (sa *ShorthandID) Equals(osa Element) bool

func (ShorthandID) Type

func (ae ShorthandID) Type() ElementType

type ShorthandOption

type ShorthandOption struct {
	Elements
	// contains filtered or unexported fields
}

func NewShorthandOption

func NewShorthandOption(value ...Element) *ShorthandOption

func (*ShorthandOption) Equals

func (sa *ShorthandOption) Equals(osa Element) bool

func (ShorthandOption) Type

func (ae ShorthandOption) Type() ElementType

type ShorthandRole

type ShorthandRole struct {
	Elements
	// contains filtered or unexported fields
}

func NewShorthandRole

func NewShorthandRole(value ...Element) *ShorthandRole

func (*ShorthandRole) Equals

func (sa *ShorthandRole) Equals(osa Element) bool

func (ShorthandRole) Type

func (ae ShorthandRole) Type() ElementType

type ShorthandStyle

type ShorthandStyle struct {
	Elements
	// contains filtered or unexported fields
}

func NewShorthandStyle

func NewShorthandStyle(value ...Element) *ShorthandStyle

func (*ShorthandStyle) Equals

func (sa *ShorthandStyle) Equals(osa Element) bool

func (ShorthandStyle) Type

func (ae ShorthandStyle) Type() ElementType

type SidebarBlock

type SidebarBlock struct {
	Delimiter Delimiter
	AttributeList

	Elements
	// contains filtered or unexported fields
}

func NewSidebarBlock

func NewSidebarBlock(delimiter Delimiter) *SidebarBlock

func (*SidebarBlock) Equals

func (a *SidebarBlock) Equals(o Element) bool

func (SidebarBlock) Origin

func (p SidebarBlock) Origin() (path string, line int)

func (SidebarBlock) Path

func (p SidebarBlock) Path() string

func (SidebarBlock) Position

func (p SidebarBlock) Position() (line int, column int, offset int)

func (SidebarBlock) Raw

func (r SidebarBlock) Raw() string

func (*SidebarBlock) SetPath

func (p *SidebarBlock) SetPath(path string)

func (*SidebarBlock) SetPosition

func (p *SidebarBlock) SetPosition(line int, column int, offset int)

func (*SidebarBlock) SetRaw

func (r *SidebarBlock) SetRaw(s string)

func (SidebarBlock) Type

func (SidebarBlock) Type() ElementType

type SingleLineComment

type SingleLineComment struct {
	Value string
	// contains filtered or unexported fields
}

func NewSingleLineComment

func NewSingleLineComment(value string) *SingleLineComment

func (*SingleLineComment) Equals

func (slc *SingleLineComment) Equals(e Element) bool

func (SingleLineComment) Origin

func (p SingleLineComment) Origin() (path string, line int)

func (SingleLineComment) Path

func (p SingleLineComment) Path() string

func (SingleLineComment) Position

func (p SingleLineComment) Position() (line int, column int, offset int)

func (SingleLineComment) Raw

func (r SingleLineComment) Raw() string

func (*SingleLineComment) SetPath

func (p *SingleLineComment) SetPath(path string)

func (*SingleLineComment) SetPosition

func (p *SingleLineComment) SetPosition(line int, column int, offset int)

func (*SingleLineComment) SetRaw

func (r *SingleLineComment) SetRaw(s string)

func (SingleLineComment) Type

type SourceBlock

type SourceBlock struct {
	Delimiter Delimiter
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewSourceBlock

func NewSourceBlock(delimiter Delimiter) *SourceBlock

func (*SourceBlock) Equals

func (a *SourceBlock) Equals(o Element) bool

func (SourceBlock) Origin

func (p SourceBlock) Origin() (path string, line int)

func (SourceBlock) Path

func (p SourceBlock) Path() string

func (SourceBlock) Position

func (p SourceBlock) Position() (line int, column int, offset int)

func (SourceBlock) Raw

func (r SourceBlock) Raw() string

func (*SourceBlock) SetPath

func (p *SourceBlock) SetPath(path string)

func (*SourceBlock) SetPosition

func (p *SourceBlock) SetPosition(line int, column int, offset int)

func (*SourceBlock) SetRaw

func (r *SourceBlock) SetRaw(s string)

func (SourceBlock) Type

func (SourceBlock) Type() ElementType

type SpecialCharacter

type SpecialCharacter struct {
	Character string
}

func NewSpecialCharacter

func NewSpecialCharacter(character string) SpecialCharacter

func (SpecialCharacter) Equals

func (s SpecialCharacter) Equals(e Element) bool

func (SpecialCharacter) Type

type StemBlock

type StemBlock struct {
	AttributeList

	Delimiter Delimiter
	LineList
	// contains filtered or unexported fields
}

func NewStemBlock

func NewStemBlock(delimiter Delimiter) *StemBlock

func (*StemBlock) Equals

func (a *StemBlock) Equals(o Element) bool

func (StemBlock) Origin

func (p StemBlock) Origin() (path string, line int)

func (StemBlock) Path

func (p StemBlock) Path() string

func (StemBlock) Position

func (p StemBlock) Position() (line int, column int, offset int)

func (StemBlock) Raw

func (r StemBlock) Raw() string

func (*StemBlock) SetPath

func (p *StemBlock) SetPath(path string)

func (*StemBlock) SetPosition

func (p *StemBlock) SetPosition(line int, column int, offset int)

func (*StemBlock) SetRaw

func (r *StemBlock) SetRaw(s string)

func (StemBlock) Type

func (StemBlock) Type() ElementType

type String

type String struct {
	Value string
}

func JoinStrings

func JoinStrings(ss []*String) *String

func NewString

func NewString(s string) *String

func (*String) Equals

func (s *String) Equals(e Element) bool

func (String) Type

func (String) Type() ElementType

type Subscript

type Subscript struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewSubscript

func NewSubscript() *Subscript

func (*Subscript) Equals

func (a *Subscript) Equals(o Element) bool

func (Subscript) Origin

func (p Subscript) Origin() (path string, line int)

func (Subscript) Path

func (p Subscript) Path() string

func (Subscript) Position

func (p Subscript) Position() (line int, column int, offset int)

func (Subscript) Raw

func (r Subscript) Raw() string

func (*Subscript) SetPath

func (p *Subscript) SetPath(path string)

func (*Subscript) SetPosition

func (p *Subscript) SetPosition(line int, column int, offset int)

func (*Subscript) SetRaw

func (r *Subscript) SetRaw(s string)

func (Subscript) Type

func (Subscript) Type() ElementType

type Superscript

type Superscript struct {
	AttributeList
	Elements
	// contains filtered or unexported fields
}

func NewSuperscript

func NewSuperscript() *Superscript

func (*Superscript) Equals

func (a *Superscript) Equals(o Element) bool

func (Superscript) Origin

func (p Superscript) Origin() (path string, line int)

func (Superscript) Path

func (p Superscript) Path() string

func (Superscript) Position

func (p Superscript) Position() (line int, column int, offset int)

func (Superscript) Raw

func (r Superscript) Raw() string

func (*Superscript) SetPath

func (p *Superscript) SetPath(path string)

func (*Superscript) SetPosition

func (p *Superscript) SetPosition(line int, column int, offset int)

func (*Superscript) SetRaw

func (r *Superscript) SetRaw(s string)

func (Superscript) Type

func (Superscript) Type() ElementType

type Table

type Table struct {
	AttributeList

	ColumnCount int
	Elements
	// contains filtered or unexported fields
}

func (*Table) Equals

func (t *Table) Equals(e Element) bool

func (Table) Origin

func (p Table) Origin() (path string, line int)

func (Table) Path

func (p Table) Path() string

func (Table) Position

func (p Table) Position() (line int, column int, offset int)

func (*Table) SetPath

func (p *Table) SetPath(path string)

func (*Table) SetPosition

func (p *Table) SetPosition(line int, column int, offset int)

func (*Table) TableRows

func (t *Table) TableRows(reader Reader) []*TableRow

func (*Table) Type

func (*Table) Type() ElementType

type TableCell

type TableCell struct {
	Format *TableCellFormat
	Parent *TableRow

	Elements

	Blank bool
	// contains filtered or unexported fields
}

func NewTableCell

func NewTableCell(format *TableCellFormat) *TableCell

func (*TableCell) Equals

func (tc *TableCell) Equals(e Element) bool

func (TableCell) Origin

func (p TableCell) Origin() (path string, line int)

func (TableCell) Path

func (p TableCell) Path() string

func (TableCell) Position

func (p TableCell) Position() (line int, column int, offset int)

func (*TableCell) SetPath

func (p *TableCell) SetPath(path string)

func (*TableCell) SetPosition

func (p *TableCell) SetPosition(line int, column int, offset int)

func (TableCell) Type

func (TableCell) Type() ElementType

type TableCellFormat

type TableCellFormat struct {
	Multiplier      Optional[int]
	Span            TableCellSpan
	HorizontalAlign Optional[TableCellHorizontalAlign]
	VerticalAlign   Optional[TableCellVerticalAlign]
	Style           Optional[TableCellStyle]
}

func NewTableCellFormat

func NewTableCellFormat() *TableCellFormat

func (*TableCellFormat) AsciiDocString

func (tcf *TableCellFormat) AsciiDocString() string

func (*TableCellFormat) Equals

func (tcf *TableCellFormat) Equals(otcf *TableCellFormat) bool

type TableCellHorizontalAlign

type TableCellHorizontalAlign uint8
const (
	TableCellHorizontalAlignLeft TableCellHorizontalAlign = iota
	TableCellHorizontalAlignRight
	TableCellHorizontalAlignCenter
)

func (TableCellHorizontalAlign) AsciiDocString

func (ha TableCellHorizontalAlign) AsciiDocString() string

func (TableCellHorizontalAlign) String

func (ha TableCellHorizontalAlign) String() string

type TableCellSpan

type TableCellSpan struct {
	Column Optional[int]
	Row    Optional[int]
}

func NewTableCellSpan

func NewTableCellSpan() TableCellSpan

type TableCellStyle

type TableCellStyle uint8
const (
	TableCellStyleDefault TableCellStyle = iota
	TableCellStyleAsciiDoc
	TableCellStyleEmphasis
	TableCellStyleHeader
	TableCellStyleLiteral
	TableCellStyleMonospace
	TableCellStyleStrong
)

func (TableCellStyle) AsciiDocString

func (ha TableCellStyle) AsciiDocString() string

func (TableCellStyle) String

func (ha TableCellStyle) String() string

type TableCellVerticalAlign

type TableCellVerticalAlign uint8
const (
	TableCellVerticalAlignTop TableCellVerticalAlign = iota
	TableCellVerticalAlignBottom
	TableCellVerticalAlignMiddle
)

func (TableCellVerticalAlign) AsciiDocString

func (ha TableCellVerticalAlign) AsciiDocString() string

func (TableCellVerticalAlign) String

func (ha TableCellVerticalAlign) String() string

type TableCells

type TableCells []*TableCell

func (*TableCells) Append

func (trs *TableCells) Append(e Element) error

func (TableCells) Children added in v1.5.41

func (trs TableCells) Children() Elements

func (*TableCells) SetChildren added in v1.5.41

func (trs *TableCells) SetChildren(els Elements) error

type TableColumn

type TableColumn struct {
	Multiplier      Optional[int]
	HorizontalAlign Optional[TableCellHorizontalAlign]
	VerticalAlign   Optional[TableCellVerticalAlign]
	Width           Optional[TableColumnWidth]
	Percentage      Optional[int]
	Style           Optional[TableCellStyle]
}

func NewTableColumn

func NewTableColumn() *TableColumn

func (*TableColumn) Equals

func (tcf *TableColumn) Equals(otcf *TableColumn) bool

func (*TableColumn) IsDefault

func (tcf *TableColumn) IsDefault() bool

type TableColumnWidth

type TableColumnWidth int
var TableColumnWidthAuto TableColumnWidth = -1

func (TableColumnWidth) AsciiDocString

func (tcv TableColumnWidth) AsciiDocString() string

func (TableColumnWidth) String

func (tcv TableColumnWidth) String() string

type TableColumnsAttribute

type TableColumnsAttribute struct {
	Columns []*TableColumn
	// contains filtered or unexported fields
}

func (*TableColumnsAttribute) AsciiDocString

func (tca *TableColumnsAttribute) AsciiDocString() string

func (TableColumnsAttribute) AttributeType

func (TableColumnsAttribute) AttributeType() AttributeType

func (*TableColumnsAttribute) Equals

func (tca *TableColumnsAttribute) Equals(a Attribute) bool

func (TableColumnsAttribute) QuoteType

func (*TableColumnsAttribute) SetValue

func (na *TableColumnsAttribute) SetValue(v any) error

func (TableColumnsAttribute) Type

func (ae TableColumnsAttribute) Type() ElementType

func (*TableColumnsAttribute) Value

func (tca *TableColumnsAttribute) Value() any

type TableRow

type TableRow struct {
	Parent *Table

	Elements
	// contains filtered or unexported fields
}

func (*TableRow) Cell

func (tr *TableRow) Cell(i int) *TableCell

func (*TableRow) Equals

func (tr *TableRow) Equals(e Element) bool

func (TableRow) Origin

func (p TableRow) Origin() (path string, line int)

func (TableRow) Path

func (p TableRow) Path() string

func (TableRow) Position

func (p TableRow) Position() (line int, column int, offset int)

func (*TableRow) SetPath

func (p *TableRow) SetPath(path string)

func (*TableRow) SetPosition

func (p *TableRow) SetPosition(line int, column int, offset int)

func (*TableRow) TableCells

func (tr *TableRow) TableCells() []*TableCell

func (TableRow) Type

func (TableRow) Type() ElementType

type TableRows

type TableRows []*TableRow

func (*TableRows) Append

func (trs *TableRows) Append(e Element) error

func (TableRows) Children added in v1.5.41

func (trs TableRows) Children() Elements

func (*TableRows) SetChildren added in v1.5.41

func (trs *TableRows) SetChildren(els Elements) error

type TextFormat

type TextFormat uint8
const (
	TextFormatNone TextFormat = iota
	TextFormatBold
	TextFormatItalic
	TextFormatMonospace
	TextFormatMarked
)

type ThematicBreak

type ThematicBreak struct {
	AttributeList
	// contains filtered or unexported fields
}

func NewThematicBreak

func NewThematicBreak() *ThematicBreak

func (*ThematicBreak) Equals

func (tb *ThematicBreak) Equals(e Element) bool

func (ThematicBreak) Origin

func (p ThematicBreak) Origin() (path string, line int)

func (ThematicBreak) Path

func (p ThematicBreak) Path() string

func (ThematicBreak) Position

func (p ThematicBreak) Position() (line int, column int, offset int)

func (ThematicBreak) Raw

func (r ThematicBreak) Raw() string

func (*ThematicBreak) SetPath

func (p *ThematicBreak) SetPath(path string)

func (*ThematicBreak) SetPosition

func (p *ThematicBreak) SetPosition(line int, column int, offset int)

func (*ThematicBreak) SetRaw

func (r *ThematicBreak) SetRaw(s string)

func (ThematicBreak) Type

func (ThematicBreak) Type() ElementType

type TitleAttribute

type TitleAttribute struct {
	Val Elements
	// contains filtered or unexported fields
}

func (*TitleAttribute) AsciiDocString

func (ta *TitleAttribute) AsciiDocString() string

func (TitleAttribute) AttributeType

func (TitleAttribute) AttributeType() AttributeType

func (*TitleAttribute) Children added in v1.5.41

func (ta *TitleAttribute) Children() Elements

func (*TitleAttribute) Equals

func (ta *TitleAttribute) Equals(oa Attribute) bool

func (TitleAttribute) QuoteType

func (TitleAttribute) QuoteType() AttributeQuoteType

func (*TitleAttribute) SetChildren added in v1.5.41

func (ta *TitleAttribute) SetChildren(els Elements)

func (*TitleAttribute) SetValue

func (ta *TitleAttribute) SetValue(v any) error

func (TitleAttribute) Type

func (ae TitleAttribute) Type() ElementType

func (*TitleAttribute) Value

func (ta *TitleAttribute) Value() any

type Traverser added in v1.5.41

type Traverser interface {
	Traverse(parent Parent) iter.Seq2[Parent, Parent]
}

type URL

type URL struct {
	Scheme string
	Path   Elements
	// contains filtered or unexported fields
}

func NewURL

func NewURL(scheme string, path Elements) URL

func (URL) Equals

func (a URL) Equals(o Element) bool

func (URL) Origin

func (p URL) Origin() (path string, line int)

func (URL) Path

func (p URL) Path() string

func (URL) Position

func (p URL) Position() (line int, column int, offset int)

func (URL) Raw

func (r URL) Raw() string

func (*URL) SetPath

func (p *URL) SetPath(path string)

func (*URL) SetPosition

func (p *URL) SetPosition(line int, column int, offset int)

func (*URL) SetRaw

func (r *URL) SetRaw(s string)

func (URL) Type

func (URL) Type() ElementType

type UnorderedList

type UnorderedList struct {
	Elements
	AttributeList
	// contains filtered or unexported fields
}

func (UnorderedList) Origin

func (p UnorderedList) Origin() (path string, line int)

func (UnorderedList) Path

func (p UnorderedList) Path() string

func (UnorderedList) Position

func (p UnorderedList) Position() (line int, column int, offset int)

func (UnorderedList) Raw

func (r UnorderedList) Raw() string

func (*UnorderedList) SetPath

func (p *UnorderedList) SetPath(path string)

func (*UnorderedList) SetPosition

func (p *UnorderedList) SetPosition(line int, column int, offset int)

func (*UnorderedList) SetRaw

func (r *UnorderedList) SetRaw(s string)

func (UnorderedList) Type

func (UnorderedList) Type() ElementType

type UnorderedListItem

type UnorderedListItem struct {
	Elements
	AttributeList

	Indent    string
	Marker    string
	Checklist Checklist
	// contains filtered or unexported fields
}

func NewUnorderedListItem

func NewUnorderedListItem(indent string, marker string, checklist Checklist) *UnorderedListItem

func (*UnorderedListItem) Equals

func (a *UnorderedListItem) Equals(o Element) bool

func (UnorderedListItem) Origin

func (p UnorderedListItem) Origin() (path string, line int)

func (UnorderedListItem) Path

func (p UnorderedListItem) Path() string

func (UnorderedListItem) Position

func (p UnorderedListItem) Position() (line int, column int, offset int)

func (UnorderedListItem) Raw

func (r UnorderedListItem) Raw() string

func (*UnorderedListItem) SetPath

func (p *UnorderedListItem) SetPath(path string)

func (*UnorderedListItem) SetPosition

func (p *UnorderedListItem) SetPosition(line int, column int, offset int)

func (*UnorderedListItem) SetRaw

func (r *UnorderedListItem) SetRaw(s string)

func (UnorderedListItem) Type

type UserAttributeReference

type UserAttributeReference struct {
	Value string
	// contains filtered or unexported fields
}

func (*UserAttributeReference) Equals

func (uar *UserAttributeReference) Equals(e Element) bool

func (*UserAttributeReference) Name

func (uar *UserAttributeReference) Name() string

func (UserAttributeReference) Origin

func (p UserAttributeReference) Origin() (path string, line int)

func (UserAttributeReference) Path

func (p UserAttributeReference) Path() string

func (UserAttributeReference) Position

func (p UserAttributeReference) Position() (line int, column int, offset int)

func (UserAttributeReference) Raw

func (r UserAttributeReference) Raw() string

func (*UserAttributeReference) SetPath

func (p *UserAttributeReference) SetPath(path string)

func (*UserAttributeReference) SetPosition

func (p *UserAttributeReference) SetPosition(line int, column int, offset int)

func (*UserAttributeReference) SetRaw

func (r *UserAttributeReference) SetRaw(s string)

func (UserAttributeReference) Type

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(set Elements) *Writer

func (*Writer) Set

func (r *Writer) Set() Elements

func (*Writer) Write

func (r *Writer) Write(el Element)

func (*Writer) WriteSet

func (r *Writer) WriteSet(el Elements)

Directories

Path Synopsis
Package parse provides readers for parsing Asciidoc
Package parse provides readers for parsing Asciidoc
Package render provides a pipeline for rendering parsed Asciidoc back into text Asciidoc
Package render provides a pipeline for rendering parsed Asciidoc back into text Asciidoc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL