Documentation ¶
Index ¶
- Variables
- func NewDefinitionDescriptionParser() parser.BlockParser
- func NewDefinitionListHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewDefinitionListParser() parser.BlockParser
- func NewFootnoteASTTransformer() parser.ASTTransformer
- func NewFootnoteBlockParser() parser.BlockParser
- func NewFootnoteHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewFootnoteParser() parser.InlineParser
- func NewLinkifyParser() parser.InlineParser
- func NewStrikethroughHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewStrikethroughParser() parser.InlineParser
- func NewTableHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewTableParagraphTransformer() parser.ParagraphTransformer
- func NewTaskCheckBoxHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewTaskCheckBoxParser() parser.InlineParser
- func NewTypographer(opts ...TypographerOption) goldmark.Extender
- func NewTypographerParser(opts ...TypographerOption) parser.InlineParser
- type DefinitionListHTMLRenderer
- type FootnoteHTMLRenderer
- type StrikethroughHTMLRenderer
- type TableHTMLRenderer
- type TaskCheckBoxHTMLRenderer
- type TypographerConfig
- type TypographerOption
- type TypographicPunctuation
- type TypographicSubstitutions
Constants ¶
This section is empty.
Variables ¶
var DefinitionList = &definitionList{}
DefinitionList is an extension that allow you to use PHP Markdown Extra Definition lists.
var Footnote = &footnote{}
Footnote is an extension that allow you to use PHP Markdown Extra Footnotes.
var GFM = &gfm{}
GFM is an extension that provides Github Flavored markdown functionalities.
var Linkify = &linkify{}
Linkify is an extension that allow you to parse text that seems like a URL.
var Strikethrough = &strikethrough{}
Strikethrough is an extension that allow you to use strikethrough expression like '~~text~~' .
var Table = &table{}
Table is an extension that allow you to use GFM tables .
var TaskList = &taskList{}
TaskList is an extension that allow you to use GFM task lists.
var Typographer = &typographer{}
Typographer is an extension that repalace punctuations with typographic entities.
Functions ¶
func NewDefinitionDescriptionParser ¶
func NewDefinitionDescriptionParser() parser.BlockParser
NewDefinitionDescriptionParser return a new parser.BlockParser that can parse definition description starts with ':'.
func NewDefinitionListHTMLRenderer ¶
func NewDefinitionListHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewDefinitionListHTMLRenderer returns a new DefinitionListHTMLRenderer.
func NewDefinitionListParser ¶
func NewDefinitionListParser() parser.BlockParser
NewDefinitionListParser return a new parser.BlockParser that can parse PHP Markdown Extra Definition lists.
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.
func NewStrikethroughHTMLRenderer ¶
func NewStrikethroughHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewStrikethroughHTMLRenderer returns a new StrikethroughHTMLRenderer.
func NewStrikethroughParser ¶
func NewStrikethroughParser() parser.InlineParser
NewStrikethroughParser return a new InlineParser that parses strikethrough expressions.
func NewTableHTMLRenderer ¶
func NewTableHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewTableHTMLRenderer returns a new TableHTMLRenderer.
func NewTableParagraphTransformer ¶
func NewTableParagraphTransformer() parser.ParagraphTransformer
NewTableParagraphTransformer returns a new ParagraphTransformer that can transform pargraphs into tables.
func NewTaskCheckBoxHTMLRenderer ¶
func NewTaskCheckBoxHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewTaskCheckBoxHTMLRenderer returns a new TaskCheckBoxHTMLRenderer.
func NewTaskCheckBoxParser ¶
func NewTaskCheckBoxParser() parser.InlineParser
NewTaskCheckBoxParser returns a new InlineParser that can parse checkboxes in list items. This parser must take precedence over the parser.LinkParser.
func NewTypographer ¶
func NewTypographer(opts ...TypographerOption) goldmark.Extender
NewTypographer returns a new Entender that repalace punctuations with typographic entities.
func NewTypographerParser ¶
func NewTypographerParser(opts ...TypographerOption) parser.InlineParser
NewTypographerParser return a new InlineParser that parses typographer expressions.
Types ¶
type DefinitionListHTMLRenderer ¶
DefinitionListHTMLRenderer is a renderer.NodeRenderer implementation that renders DefinitionList nodes.
func (*DefinitionListHTMLRenderer) RegisterFuncs ¶
func (r *DefinitionListHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
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 StrikethroughHTMLRenderer ¶
StrikethroughHTMLRenderer is a renderer.NodeRenderer implementation that renders Strikethrough nodes.
func (*StrikethroughHTMLRenderer) RegisterFuncs ¶
func (r *StrikethroughHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
type TableHTMLRenderer ¶
TableHTMLRenderer is a renderer.NodeRenderer implementation that renders Table nodes.
func (*TableHTMLRenderer) RegisterFuncs ¶
func (r *TableHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
type TaskCheckBoxHTMLRenderer ¶
TaskCheckBoxHTMLRenderer is a renderer.NodeRenderer implementation that renders checkboxes in list items.
func (*TaskCheckBoxHTMLRenderer) RegisterFuncs ¶
func (r *TaskCheckBoxHTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
type TypographerConfig ¶
type TypographerConfig struct {
Substitutions [][]byte
}
An TypographerConfig struct is a data structure that holds configuration of the Typographer extension.
func (*TypographerConfig) SetOption ¶
func (b *TypographerConfig) SetOption(name parser.OptionName, value interface{})
SetOption implements SetOptioner.
type TypographerOption ¶
type TypographerOption interface { parser.Option SetTypographerOption(*TypographerConfig) }
A TypographerOption interface sets options for the TypographerParser.
func WithTypographicSubstitutions ¶
func WithTypographicSubstitutions(values map[TypographicPunctuation][]byte) TypographerOption
WithTypographicSubstitutions is a functional otpion that specify replacement text for punctuations.
type TypographicPunctuation ¶
type TypographicPunctuation int
TypographicPunctuation is a key of the punctuations that can be replaced with typographic entities.
const ( // LeftSingleQuote is ' LeftSingleQuote TypographicPunctuation = iota + 1 // RightSingleQuote is ' RightSingleQuote // LeftDoubleQuote is " LeftDoubleQuote // RightDoubleQuote is " RightDoubleQuote // EnDash is -- EnDash // EmDash is --- EmDash // Ellipsis is ... Ellipsis // LeftAngleQuote is << LeftAngleQuote // RightAngleQuote is >> RightAngleQuote )
type TypographicSubstitutions ¶
type TypographicSubstitutions map[TypographicPunctuation][]byte
TypographicSubstitutions is a list of the substitutions for the Typographer extension.