Documentation ¶
Index ¶
- Variables
- func CleanValue(value []byte) []byte
- func NewFootnoteASTTransformer() parser.ASTTransformer
- func NewFootnoteBlockParser() parser.BlockParser
- func NewFootnoteHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewFootnoteParser() parser.InlineParser
- func NewLinkifyParser() parser.InlineParser
- type Footnote
- type FootnoteBackLink
- type FootnoteHTMLRenderer
- type FootnoteLink
- type FootnoteList
Constants ¶
This section is empty.
Variables ¶
var FootnoteExtension = &footnoteExtension{}
FootnoteExtension represents the Gitea Footnote
var KindFootnote = ast.NewNodeKind("GiteaFootnote")
KindFootnote is a NodeKind of the Footnote node.
var KindFootnoteBackLink = ast.NewNodeKind("GiteaFootnoteBackLink")
KindFootnoteBackLink is a NodeKind of the FootnoteBackLink node.
var KindFootnoteLink = ast.NewNodeKind("GiteaFootnoteLink")
KindFootnoteLink is a NodeKind of the FootnoteLink node.
var KindFootnoteList = ast.NewNodeKind("GiteaFootnoteList")
KindFootnoteList is a NodeKind of the FootnoteList node.
var LinkRegex, _ = xurls.StrictMatchingScheme("https?://")
LinkRegex is a regexp matching a valid link
var Linkify = &linkify{}
Linkify is an extension that allow you to parse text that seems like a URL.
Functions ¶
func CleanValue ¶
CleanValue will clean a value to make it safe to be an id This function is quite different from the original goldmark function and more closely matches the output from the shurcooL sanitizer In particular Unicode letters and numbers are a lot more than a-zA-Z0-9...
func NewFootnoteASTTransformer ¶
func NewFootnoteASTTransformer() parser.ASTTransformer
NewFootnoteASTTransformer returns a new parser.ASTTransformer that insert a footnote list to the last of the document.
func NewFootnoteBlockParser ¶
func NewFootnoteBlockParser() parser.BlockParser
NewFootnoteBlockParser returns a new parser.BlockParser that can parse footnotes of the Markdown(PHP Markdown Extra) text.
func NewFootnoteHTMLRenderer ¶
func NewFootnoteHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewFootnoteHTMLRenderer returns a new FootnoteHTMLRenderer.
func NewFootnoteParser ¶
func NewFootnoteParser() parser.InlineParser
NewFootnoteParser returns a new parser.InlineParser that can parse footnote links of the Markdown(PHP Markdown Extra) text.
func NewLinkifyParser ¶
func NewLinkifyParser() parser.InlineParser
NewLinkifyParser return a new InlineParser can parse text that seems like a URL.
Types ¶
type Footnote ¶
A Footnote struct represents a footnote of Markdown (PHP Markdown Extra) text.
type FootnoteBackLink ¶
type FootnoteBackLink struct { ast.BaseInline Index int Name []byte }
A FootnoteBackLink struct represents a link to a footnote of Markdown (PHP Markdown Extra) text.
func NewFootnoteBackLink ¶
func NewFootnoteBackLink(index int, name []byte) *FootnoteBackLink
NewFootnoteBackLink returns a new FootnoteBackLink node.
func (*FootnoteBackLink) Dump ¶
func (n *FootnoteBackLink) Dump(source []byte, level int)
Dump implements Node.Dump.
func (*FootnoteBackLink) Kind ¶
func (n *FootnoteBackLink) Kind() ast.NodeKind
Kind implements Node.Kind.
type FootnoteHTMLRenderer ¶
FootnoteHTMLRenderer is a renderer.NodeRenderer implementation that renders FootnoteLink nodes.
func (*FootnoteHTMLRenderer) RegisterFuncs ¶
func (r *FootnoteHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
type FootnoteLink ¶
type FootnoteLink struct { ast.BaseInline Index int Name []byte }
A FootnoteLink struct represents a link to a footnote of Markdown (PHP Markdown Extra) text.
func NewFootnoteLink ¶
func NewFootnoteLink(index int, name []byte) *FootnoteLink
NewFootnoteLink returns a new FootnoteLink node.
func (*FootnoteLink) Dump ¶
func (n *FootnoteLink) Dump(source []byte, level int)
Dump implements Node.Dump.
type FootnoteList ¶
A FootnoteList struct represents footnotes of Markdown (PHP Markdown Extra) text.
func NewFootnoteList ¶
func NewFootnoteList() *FootnoteList
NewFootnoteList returns a new FootnoteList node.
func (*FootnoteList) Dump ¶
func (n *FootnoteList) Dump(source []byte, level int)
Dump implements Node.Dump.