Documentation ¶
Index ¶
- Constants
- func Examples(s string) string
- func LongDesc(s string) string
- func Normalize(cmd *cobra.Command) *cobra.Command
- func NormalizeAll(cmd *cobra.Command) *cobra.Command
- type ASCIIRenderer
- func (r *ASCIIRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int)
- func (r *ASCIIRenderer) BlockCode(out *bytes.Buffer, text []byte, lang string)
- func (r *ASCIIRenderer) BlockHtml(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) BlockQuote(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) CodeSpan(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) DocumentFooter(out *bytes.Buffer)
- func (r *ASCIIRenderer) DocumentHeader(out *bytes.Buffer)
- func (r *ASCIIRenderer) DoubleEmphasis(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) Emphasis(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) Entity(out *bytes.Buffer, entity []byte)
- func (r *ASCIIRenderer) FootnoteItem(out *bytes.Buffer, name, text []byte, flags int)
- func (r *ASCIIRenderer) FootnoteRef(out *bytes.Buffer, ref []byte, id int)
- func (r *ASCIIRenderer) Footnotes(out *bytes.Buffer, text func() bool)
- func (r *ASCIIRenderer) GetFlags() int
- func (r *ASCIIRenderer) HRule(out *bytes.Buffer)
- func (r *ASCIIRenderer) Header(out *bytes.Buffer, text func() bool, level int, id string)
- func (r *ASCIIRenderer) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte)
- func (r *ASCIIRenderer) LineBreak(out *bytes.Buffer)
- func (r *ASCIIRenderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte)
- func (r *ASCIIRenderer) List(out *bytes.Buffer, text func() bool, flags int)
- func (r *ASCIIRenderer) ListItem(out *bytes.Buffer, text []byte, flags int)
- func (r *ASCIIRenderer) NormalText(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) Paragraph(out *bytes.Buffer, text func() bool)
- func (r *ASCIIRenderer) RawHtmlTag(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) Smartypants(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) StrikeThrough(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) Table(out *bytes.Buffer, header []byte, body []byte, columnData []int)
- func (r *ASCIIRenderer) TableCell(out *bytes.Buffer, text []byte, align int)
- func (r *ASCIIRenderer) TableHeaderCell(out *bytes.Buffer, text []byte, align int)
- func (r *ASCIIRenderer) TableRow(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) TitleBlock(out *bytes.Buffer, text []byte)
- func (r *ASCIIRenderer) TocFinalize()
- func (r *ASCIIRenderer) TocHeader(text []byte, level int)
- func (r *ASCIIRenderer) TocHeaderWithAnchor(text []byte, level int, anchor string)
- func (r *ASCIIRenderer) TripleEmphasis(out *bytes.Buffer, text []byte)
Constants ¶
const Indentation = ` `
Indentation string to use for indents
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ASCIIRenderer ¶
type ASCIIRenderer struct { Indentation string // contains filtered or unexported fields }
ASCIIRenderer is a blackfriday.Renderer intended for rendering markdown documents as plain text, well suited for human reading on terminals.
func (*ASCIIRenderer) AutoLink ¶
func (r *ASCIIRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int)
AutoLink writes autolink
func (*ASCIIRenderer) BlockCode ¶
func (r *ASCIIRenderer) BlockCode(out *bytes.Buffer, text []byte, lang string)
BlockCode renders a chunk of text that represents source code.
func (*ASCIIRenderer) BlockHtml ¶
func (r *ASCIIRenderer) BlockHtml(out *bytes.Buffer, text []byte)
BlockHtml writes htlm
func (*ASCIIRenderer) BlockQuote ¶
func (r *ASCIIRenderer) BlockQuote(out *bytes.Buffer, text []byte)
BlockQuote writes block
func (*ASCIIRenderer) CodeSpan ¶
func (r *ASCIIRenderer) CodeSpan(out *bytes.Buffer, text []byte)
CodeSpan writes code span
func (*ASCIIRenderer) DocumentFooter ¶
func (r *ASCIIRenderer) DocumentFooter(out *bytes.Buffer)
DocumentFooter does nothing
func (*ASCIIRenderer) DocumentHeader ¶
func (r *ASCIIRenderer) DocumentHeader(out *bytes.Buffer)
DocumentHeader does nothing
func (*ASCIIRenderer) DoubleEmphasis ¶
func (r *ASCIIRenderer) DoubleEmphasis(out *bytes.Buffer, text []byte)
DoubleEmphasis writes double emphasis
func (*ASCIIRenderer) Emphasis ¶
func (r *ASCIIRenderer) Emphasis(out *bytes.Buffer, text []byte)
Emphasis writes emphasis
func (*ASCIIRenderer) Entity ¶
func (r *ASCIIRenderer) Entity(out *bytes.Buffer, entity []byte)
Entity writes entity
func (*ASCIIRenderer) FootnoteItem ¶
func (r *ASCIIRenderer) FootnoteItem(out *bytes.Buffer, name, text []byte, flags int)
FootnoteItem writes footnote item
func (*ASCIIRenderer) FootnoteRef ¶
func (r *ASCIIRenderer) FootnoteRef(out *bytes.Buffer, ref []byte, id int)
FootnoteRef writes footnote ref
func (*ASCIIRenderer) Footnotes ¶
func (r *ASCIIRenderer) Footnotes(out *bytes.Buffer, text func() bool)
Footnotes writes footnotes
func (*ASCIIRenderer) HRule ¶
func (r *ASCIIRenderer) HRule(out *bytes.Buffer)
HRule returns horizontal line
func (*ASCIIRenderer) LineBreak ¶
func (r *ASCIIRenderer) LineBreak(out *bytes.Buffer)
LineBreak returns a line break
func (*ASCIIRenderer) List ¶
func (r *ASCIIRenderer) List(out *bytes.Buffer, text func() bool, flags int)
List renders the start and end of a list.
func (*ASCIIRenderer) ListItem ¶
func (r *ASCIIRenderer) ListItem(out *bytes.Buffer, text []byte, flags int)
ListItem renders list items and supports both ordered and unordered lists.
func (*ASCIIRenderer) NormalText ¶
func (r *ASCIIRenderer) NormalText(out *bytes.Buffer, text []byte)
NormalText gets a text chunk *after* the markdown syntax was already processed and does a final cleanup on things we don't expect here, like removing linebreaks on things that are not a paragraph break (auto unwrap).
func (*ASCIIRenderer) Paragraph ¶
func (r *ASCIIRenderer) Paragraph(out *bytes.Buffer, text func() bool)
Paragraph renders the start and end of a paragraph.
func (*ASCIIRenderer) RawHtmlTag ¶
func (r *ASCIIRenderer) RawHtmlTag(out *bytes.Buffer, text []byte)
RawHtmlTag writes raw htlm tag
func (*ASCIIRenderer) Smartypants ¶
func (r *ASCIIRenderer) Smartypants(out *bytes.Buffer, text []byte)
Smartypants writes smartypants
func (*ASCIIRenderer) StrikeThrough ¶
func (r *ASCIIRenderer) StrikeThrough(out *bytes.Buffer, text []byte)
StrikeThrough writes strike through
func (*ASCIIRenderer) TableCell ¶
func (r *ASCIIRenderer) TableCell(out *bytes.Buffer, text []byte, align int)
TableCell writes table cell
func (*ASCIIRenderer) TableHeaderCell ¶
func (r *ASCIIRenderer) TableHeaderCell(out *bytes.Buffer, text []byte, align int)
TableHeaderCell writes table header cell
func (*ASCIIRenderer) TableRow ¶
func (r *ASCIIRenderer) TableRow(out *bytes.Buffer, text []byte)
TableRow writes table row
func (*ASCIIRenderer) TitleBlock ¶
func (r *ASCIIRenderer) TitleBlock(out *bytes.Buffer, text []byte)
TitleBlock writes title block
func (*ASCIIRenderer) TocHeader ¶
func (r *ASCIIRenderer) TocHeader(text []byte, level int)
TocHeader does nothing
func (*ASCIIRenderer) TocHeaderWithAnchor ¶
func (r *ASCIIRenderer) TocHeaderWithAnchor(text []byte, level int, anchor string)
TocHeaderWithAnchor does nothing
func (*ASCIIRenderer) TripleEmphasis ¶
func (r *ASCIIRenderer) TripleEmphasis(out *bytes.Buffer, text []byte)
TripleEmphasis writes triple emphasis