Versions in this module Expand all Collapse all v1 v1.0.0 Jun 21, 2024 Changes in this version + const AutoHeadingIDs + const Autolink + const BackslashLineBreak + const CommonExtensions + const CommonHTMLFlags + const DefinitionLists + const FencedCode + const Footnotes + const HardLineBreak + const HeadingIDs + const LaxHTMLBlocks + const NoEmptyLineBeforeBlock + const NoExtensions + const NoIntraEmphasis + const SpaceHeadings + const Strikethrough + const TabSizeDefault + const TabSizeDouble + const TabSizeEight + const Tables + const Titleblock + const Version + func Run(input []byte, opts ...Option) []byte + func SanitizedAnchorName(text string) string + type CellAlignFlags int + const TableAlignmentCenter + const TableAlignmentLeft + const TableAlignmentRight + type CodeBlockData struct + FenceChar byte + FenceLength int + FenceOffset int + Info []byte + IsFenced bool + type Extensions int + type HTMLFlags int + const CompletePage + const FootnoteReturnLinks + const HTMLFlagsNone + const HrefTargetBlank + const NofollowLinks + const NoopenerLinks + const NoreferrerLinks + const Safelink + const SkipHTML + const SkipImages + const SkipLinks + const Smartypants + const SmartypantsAngledQuotes + const SmartypantsDashes + const SmartypantsFractions + const SmartypantsLatexDashes + const SmartypantsQuotesNBSP + const TOC + const UseXHTML + type HTMLRenderer struct + func NewHTMLRenderer(params HTMLRendererParameters) *HTMLRenderer + func (r *HTMLRenderer) RenderFooter(w io.Writer, ast *Node) + func (r *HTMLRenderer) RenderHeader(w io.Writer, ast *Node) + func (r *HTMLRenderer) RenderNode(w io.Writer, node *Node, entering bool) WalkStatus + type HTMLRendererParameters struct + AbsolutePrefix string + CSS string + Flags HTMLFlags + FootnoteAnchorPrefix string + FootnoteReturnLinkContents string + HeadingIDPrefix string + HeadingIDSuffix string + HeadingLevelOffset int + Icon string + Title string + type HeadingData struct + HeadingID string + IsTitleblock bool + Level int + type Latex struct + func (options *Latex) AutoLink(out *bytes.Buffer, link []byte, kind int) + func (options *Latex) BlockCode(out *bytes.Buffer, text []byte, info string) + func (options *Latex) BlockHtml(out *bytes.Buffer, text []byte) + func (options *Latex) BlockQuote(out *bytes.Buffer, text []byte) + func (options *Latex) CodeSpan(out *bytes.Buffer, text []byte) + func (options *Latex) DocumentFooter(out *bytes.Buffer) + func (options *Latex) DocumentHeader(out *bytes.Buffer) + func (options *Latex) DoubleEmphasis(out *bytes.Buffer, text []byte) + func (options *Latex) Emphasis(out *bytes.Buffer, text []byte) + func (options *Latex) Entity(out *bytes.Buffer, entity []byte) + func (options *Latex) FootnoteItem(out *bytes.Buffer, name, text []byte, flags int) + func (options *Latex) FootnoteRef(out *bytes.Buffer, ref []byte, id int) + func (options *Latex) Footnotes(out *bytes.Buffer, text func() bool) + func (options *Latex) GetFlags() int + func (options *Latex) HRule(out *bytes.Buffer) + func (options *Latex) Header(out *bytes.Buffer, text func() bool, level int, id string) + func (options *Latex) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte) + func (options *Latex) LineBreak(out *bytes.Buffer) + func (options *Latex) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) + func (options *Latex) List(out *bytes.Buffer, text func() bool, flags int) + func (options *Latex) ListItem(out *bytes.Buffer, text []byte, flags int) + func (options *Latex) NormalText(out *bytes.Buffer, text []byte) + func (options *Latex) Paragraph(out *bytes.Buffer, text func() bool) + func (options *Latex) RawHtmlTag(out *bytes.Buffer, tag []byte) + func (options *Latex) StrikeThrough(out *bytes.Buffer, text []byte) + func (options *Latex) Table(out *bytes.Buffer, header []byte, body []byte, columnData []int) + func (options *Latex) TableCell(out *bytes.Buffer, text []byte, align int) + func (options *Latex) TableHeaderCell(out *bytes.Buffer, text []byte, align int) + func (options *Latex) TableRow(out *bytes.Buffer, text []byte) + func (options *Latex) TitleBlock(out *bytes.Buffer, text []byte) + func (options *Latex) TripleEmphasis(out *bytes.Buffer, text []byte) + type LinkData struct + Destination []byte + Footnote *Node + NoteID int + Title []byte + type ListData struct + BulletChar byte + Delimiter byte + IsFootnotesList bool + ListFlags ListType + RefLink []byte + Tight bool + type ListType int + const ListItemBeginningOfList + const ListItemContainsBlock + const ListItemEndOfList + const ListTypeDefinition + const ListTypeOrdered + const ListTypeTerm + type Markdown struct + func New(opts ...Option) *Markdown + func (p *Markdown) Parse(input []byte) *Node + type Node struct + FirstChild *Node + LastChild *Node + Literal []byte + Next *Node + Parent *Node + Prev *Node + Type NodeType + func NewNode(typ NodeType) *Node + func (n *Node) AppendChild(child *Node) + func (n *Node) InsertBefore(sibling *Node) + func (n *Node) IsContainer() bool + func (n *Node) IsLeaf() bool + func (n *Node) String() string + func (n *Node) Unlink() + func (n *Node) Walk(visitor NodeVisitor) + type NodeType int + const BlockQuote + const Code + const CodeBlock + const Del + const Document + const Emph + const HTMLBlock + const HTMLSpan + const Hardbreak + const Heading + const HorizontalRule + const Image + const Item + const Link + const List + const Paragraph + const Softbreak + const Strong + const Table + const TableBody + const TableCell + const TableHead + const TableRow + const Text + func (t NodeType) String() string + type NodeVisitor func(node *Node, entering bool) WalkStatus + type Option func(*Markdown) + func WithExtensions(e Extensions) Option + func WithNoExtensions() Option + func WithRefOverride(o ReferenceOverrideFunc) Option + func WithRenderer(r Renderer) Option + type Reference struct + Link string + Text string + Title string + type ReferenceOverrideFunc func(reference string) (ref *Reference, overridden bool) + type Renderer interface + RenderFooter func(w io.Writer, ast *Node) + RenderHeader func(w io.Writer, ast *Node) + RenderNode func(w io.Writer, node *Node, entering bool) WalkStatus + func LatexRenderer(flags int) Renderer + type SPRenderer struct + func NewSmartypantsRenderer(flags HTMLFlags) *SPRenderer + func (r *SPRenderer) Process(w io.Writer, text []byte) + type TableCellData struct + Align CellAlignFlags + IsHeader bool + type WalkStatus int + const GoToNext + const SkipChildren + const Terminate