Documentation ¶
Index ¶
- func StripMarkdown(rawBytes []byte) (string, []string)
- func StripMarkdownBytes(rawBytes []byte) ([]byte, []string)
- type MarkdownStripper
- func (r *MarkdownStripper) AutoLink(out *bytes.Buffer, link []byte, kind int)
- func (r *MarkdownStripper) BlockCode(out *bytes.Buffer, text []byte, infoString string)
- func (r *MarkdownStripper) BlockHtml(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) BlockQuote(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) CodeSpan(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) DocumentFooter(out *bytes.Buffer)
- func (r *MarkdownStripper) DocumentHeader(out *bytes.Buffer)
- func (r *MarkdownStripper) DoubleEmphasis(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) Emphasis(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) Entity(out *bytes.Buffer, entity []byte)
- func (r *MarkdownStripper) FootnoteItem(out *bytes.Buffer, name, text []byte, flags int)
- func (r *MarkdownStripper) FootnoteRef(out *bytes.Buffer, ref []byte, id int)
- func (r *MarkdownStripper) Footnotes(out *bytes.Buffer, text func() bool)
- func (r *MarkdownStripper) GetFlags() int
- func (r *MarkdownStripper) GetLinks() []string
- func (r *MarkdownStripper) HRule(out *bytes.Buffer)
- func (r *MarkdownStripper) Header(out *bytes.Buffer, text func() bool, level int, id string)
- func (r *MarkdownStripper) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte)
- func (r *MarkdownStripper) LineBreak(out *bytes.Buffer)
- func (r *MarkdownStripper) Link(out *bytes.Buffer, link []byte, title []byte, content []byte)
- func (r *MarkdownStripper) List(out *bytes.Buffer, text func() bool, flags int)
- func (r *MarkdownStripper) ListItem(out *bytes.Buffer, text []byte, flags int)
- func (r *MarkdownStripper) NormalText(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) Paragraph(out *bytes.Buffer, text func() bool)
- func (r *MarkdownStripper) RawHtmlTag(out *bytes.Buffer, tag []byte)
- func (r *MarkdownStripper) StrikeThrough(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) Table(out *bytes.Buffer, header []byte, body []byte, columnData []int)
- func (r *MarkdownStripper) TableCell(out *bytes.Buffer, text []byte, flags int)
- func (r *MarkdownStripper) TableHeaderCell(out *bytes.Buffer, text []byte, flags int)
- func (r *MarkdownStripper) TableRow(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) TitleBlock(out *bytes.Buffer, text []byte)
- func (r *MarkdownStripper) TripleEmphasis(out *bytes.Buffer, text []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StripMarkdown ¶
StripMarkdown parses markdown content by removing all markup and code blocks
in order to extract links and other references
func StripMarkdownBytes ¶
StripMarkdownBytes parses markdown content by removing all markup and code blocks
in order to extract links and other references
Types ¶
type MarkdownStripper ¶
type MarkdownStripper struct { blackfriday.Renderer // contains filtered or unexported fields }
MarkdownStripper extends blackfriday.Renderer
func (*MarkdownStripper) AutoLink ¶
func (r *MarkdownStripper) AutoLink(out *bytes.Buffer, link []byte, kind int)
AutoLink dummy function to proceed with rendering
func (*MarkdownStripper) BlockCode ¶
func (r *MarkdownStripper) BlockCode(out *bytes.Buffer, text []byte, infoString string)
BlockCode dummy function to proceed with rendering
func (*MarkdownStripper) BlockHtml ¶
func (r *MarkdownStripper) BlockHtml(out *bytes.Buffer, text []byte)
BlockHtml dummy function to proceed with rendering
func (*MarkdownStripper) BlockQuote ¶
func (r *MarkdownStripper) BlockQuote(out *bytes.Buffer, text []byte)
BlockQuote dummy function to proceed with rendering
func (*MarkdownStripper) CodeSpan ¶
func (r *MarkdownStripper) CodeSpan(out *bytes.Buffer, text []byte)
CodeSpan dummy function to proceed with rendering
func (*MarkdownStripper) DocumentFooter ¶
func (r *MarkdownStripper) DocumentFooter(out *bytes.Buffer)
DocumentFooter dummy function to proceed with rendering
func (*MarkdownStripper) DocumentHeader ¶
func (r *MarkdownStripper) DocumentHeader(out *bytes.Buffer)
DocumentHeader dummy function to proceed with rendering
func (*MarkdownStripper) DoubleEmphasis ¶
func (r *MarkdownStripper) DoubleEmphasis(out *bytes.Buffer, text []byte)
DoubleEmphasis dummy function to proceed with rendering
func (*MarkdownStripper) Emphasis ¶
func (r *MarkdownStripper) Emphasis(out *bytes.Buffer, text []byte)
Emphasis dummy function to proceed with rendering
func (*MarkdownStripper) Entity ¶
func (r *MarkdownStripper) Entity(out *bytes.Buffer, entity []byte)
Entity dummy function to proceed with rendering
func (*MarkdownStripper) FootnoteItem ¶
func (r *MarkdownStripper) FootnoteItem(out *bytes.Buffer, name, text []byte, flags int)
FootnoteItem dummy function to proceed with rendering
func (*MarkdownStripper) FootnoteRef ¶
func (r *MarkdownStripper) FootnoteRef(out *bytes.Buffer, ref []byte, id int)
FootnoteRef dummy function to proceed with rendering
func (*MarkdownStripper) Footnotes ¶
func (r *MarkdownStripper) Footnotes(out *bytes.Buffer, text func() bool)
Footnotes dummy function to proceed with rendering
func (*MarkdownStripper) GetFlags ¶
func (r *MarkdownStripper) GetFlags() int
GetFlags returns rendering flags
func (*MarkdownStripper) GetLinks ¶
func (r *MarkdownStripper) GetLinks() []string
GetLinks returns the list of link data collected while parsing
func (*MarkdownStripper) HRule ¶
func (r *MarkdownStripper) HRule(out *bytes.Buffer)
HRule dummy function to proceed with rendering
func (*MarkdownStripper) LineBreak ¶
func (r *MarkdownStripper) LineBreak(out *bytes.Buffer)
LineBreak dummy function to proceed with rendering
func (*MarkdownStripper) List ¶
func (r *MarkdownStripper) List(out *bytes.Buffer, text func() bool, flags int)
List dummy function to proceed with rendering
func (*MarkdownStripper) ListItem ¶
func (r *MarkdownStripper) ListItem(out *bytes.Buffer, text []byte, flags int)
ListItem dummy function to proceed with rendering
func (*MarkdownStripper) NormalText ¶
func (r *MarkdownStripper) NormalText(out *bytes.Buffer, text []byte)
NormalText dummy function to proceed with rendering
func (*MarkdownStripper) Paragraph ¶
func (r *MarkdownStripper) Paragraph(out *bytes.Buffer, text func() bool)
Paragraph dummy function to proceed with rendering
func (*MarkdownStripper) RawHtmlTag ¶
func (r *MarkdownStripper) RawHtmlTag(out *bytes.Buffer, tag []byte)
RawHtmlTag dummy function to proceed with rendering
func (*MarkdownStripper) StrikeThrough ¶
func (r *MarkdownStripper) StrikeThrough(out *bytes.Buffer, text []byte)
StrikeThrough dummy function to proceed with rendering
func (*MarkdownStripper) TableCell ¶
func (r *MarkdownStripper) TableCell(out *bytes.Buffer, text []byte, flags int)
TableCell dummy function to proceed with rendering
func (*MarkdownStripper) TableHeaderCell ¶
func (r *MarkdownStripper) TableHeaderCell(out *bytes.Buffer, text []byte, flags int)
TableHeaderCell dummy function to proceed with rendering
func (*MarkdownStripper) TableRow ¶
func (r *MarkdownStripper) TableRow(out *bytes.Buffer, text []byte)
TableRow dummy function to proceed with rendering
func (*MarkdownStripper) TitleBlock ¶
func (r *MarkdownStripper) TitleBlock(out *bytes.Buffer, text []byte)
TitleBlock dummy function to proceed with rendering
func (*MarkdownStripper) TripleEmphasis ¶
func (r *MarkdownStripper) TripleEmphasis(out *bytes.Buffer, text []byte)
TripleEmphasis dummy function to proceed with rendering