Documentation
¶
Index ¶
- func BuildLineMap(text string) []int
- func Parse(source string) ([]Element, *BlockFeatures, *YAMLMetadata)
- type Admonition
- type BlockAttribute
- type BlockFeatures
- type DefType
- type DitaSchema
- type DocKind
- type Document
- type Element
- type FootnoteLabel
- type Heading
- type Index
- func (idx *Index) AllLinks() []Element
- func (idx *Index) Headings() []*Heading
- func (idx *Index) HeadingsBySlug(slug paths.Slug) []*Heading
- func (idx *Index) LinkDefByLabel(label string) *LinkDef
- func (idx *Index) LinkDefs() []*LinkDef
- func (idx *Index) MdLinks() []*MdLink
- func (idx *Index) Title() *Heading
- type InlineAttribute
- type LinkDef
- type MdLink
- type ParsedAttribute
- type Position
- type Range
- type RefType
- type RelatedLinksInfo
- type SymKind
- type Symbol
- type TaskSectionKind
- type YAMLMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildLineMap ¶
func Parse ¶
func Parse(source string) ([]Element, *BlockFeatures, *YAMLMetadata)
Types ¶
type Admonition ¶
type BlockAttribute ¶
type BlockAttribute struct {
Attr ParsedAttribute
Line int
}
func ScanBlockAttributes ¶
func ScanBlockAttributes(source string) []BlockAttribute
type BlockFeatures ¶
type BlockFeatures struct {
HasOrderedList bool
HasUnorderedList bool
HasTable bool
HasDefinitionList bool
HasFootnoteRefs bool
HasFootnoteDefs bool
HasStrikethrough bool
HasAttributes bool
FootnoteRefLabels []FootnoteLabel
FootnoteDefLabels []FootnoteLabel
Admonitions []Admonition
}
type DitaSchema ¶
type DitaSchema int
const ( SchemaTopic DitaSchema = iota SchemaConcept SchemaTask SchemaReference SchemaMap SchemaMditaTopic SchemaMditaCoreTopic SchemaMditaExtendedTopic SchemaUnknown )
func DitaSchemaFromString ¶
func DitaSchemaFromString(s string) DitaSchema
type Document ¶
type Document struct {
URI string
Version int
Text string
Lines []int
Elements []Element
Symbols []Symbol
Index *Index
Meta *YAMLMetadata
Kind DocKind
InlineAttrs []InlineAttribute
BlockAttrs []BlockAttribute
RelLinks *RelatedLinksInfo
}
func (*Document) ApplyChange ¶
type FootnoteLabel ¶
type Heading ¶
type Heading struct {
Level int
Text string
ID string
Slug paths.Slug
Range Range
Attributes *ParsedAttribute
TaskSection TaskSectionKind
IsRelLinks bool
}
type Index ¶
type Index struct {
Meta *YAMLMetadata
Features *BlockFeatures
ShortDesc string
// contains filtered or unexported fields
}
func BuildIndex ¶
func BuildIndex(elements []Element, bf *BlockFeatures, meta *YAMLMetadata) *Index
func (*Index) LinkDefByLabel ¶
type InlineAttribute ¶
type InlineAttribute struct {
Attr ParsedAttribute
TargetKind string // "bold", "italic", "code", "paragraph"
TargetText string
Line int
Col int
}
func ScanInlineAttributes ¶
func ScanInlineAttributes(source string) []InlineAttribute
type ParsedAttribute ¶
func ParseAttrString ¶
func ParseAttrString(s string) ParsedAttribute
type RelatedLinksInfo ¶
type TaskSectionKind ¶
type TaskSectionKind int
const ( TaskSectionNone TaskSectionKind = iota TaskSectionPrereq TaskSectionContext TaskSectionResult TaskSectionPostreq TaskSectionTroubleshooting )
Click to show internal directories.
Click to hide internal directories.