Documentation
¶
Index ¶
Constants ¶
View Source
const MaxDepth = 6
Variables ¶
View Source
var ( ErrColumnsInvalidOpenFormat = errors.New("invalid heading format") ErrColumnsUnexpectedOrInvalidTag = errors.New("unexpected or invalid tag") )
Error messages for invalid column tags.
View Source
var ( KindColumn = ast.NewNodeKind("Column") MaxHeading = 6 )
Define custom node kind and maximum heading level.
View Source
var Columns = &columns{}
Columns instance for extending markdown with column functionality.
View Source
var GnoExtension = &gnoExtension{}
Functions ¶
This section is empty.
Types ¶
type ColumnNode ¶
type ColumnNode struct { ast.BaseBlock Index int // Index of the column associated with the node. Tag ColumnTag // Current Column Tag for this node. Error error // If not nil, indicates that the node is invalid. // contains filtered or unexported fields }
ColumnNode represents a semantic tree for a "column".
func NewColumn ¶
func NewColumn(ctx *columnsContext, index int, tag ColumnTag) *ColumnNode
NewColumn initializes a ColumnNode object.
func (*ColumnNode) Dump ¶
func (n *ColumnNode) Dump(source []byte, level int)
Dump implements Node.Dump for debug representation.
func (*ColumnNode) String ¶
func (n *ColumnNode) String() string
type GoldenTests ¶
func NewGoldentTests ¶
func NewGoldentTests(exec GenFunc) *GoldenTests
type TocItem ¶
type TocItem struct { // Title of this item in the table of contents. // // This may be blank for items that don't refer to a heading, and only // have sub-items. Title []byte // ID is the identifier for the heading that this item refers to. This // is the fragment portion of the link without the "#". // // This may be blank if the item doesn't have an id assigned to it, or // if it doesn't have a title. // // Enable AutoHeadingID in your parser if you expected these to be set // but they weren't. ID []byte // Items references children of this item. // // For a heading at level 3, Items, contains the headings at level 4 // under that section. Items []*TocItem }
type TocOptions ¶
type TocOptions struct {
MinDepth, MaxDepth int
}
Click to show internal directories.
Click to hide internal directories.