mdstripper

package
v1.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripMarkdown

func StripMarkdown(rawBytes []byte) (string, []string)

StripMarkdown parses markdown content by removing all markup and code blocks

in order to extract links and other references

func StripMarkdownBytes

func StripMarkdownBytes(rawBytes []byte) ([]byte, []string)

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 (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 (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) Header

func (r *MarkdownStripper) Header(out *bytes.Buffer, text func() bool, level int, id string)

Header dummy function to proceed with rendering

func (*MarkdownStripper) Image

func (r *MarkdownStripper) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte)

Image dummy function to proceed with rendering

func (*MarkdownStripper) LineBreak

func (r *MarkdownStripper) LineBreak(out *bytes.Buffer)

LineBreak dummy function to proceed with rendering

func (r *MarkdownStripper) Link(out *bytes.Buffer, link []byte, title []byte, content []byte)

Link 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) Table

func (r *MarkdownStripper) Table(out *bytes.Buffer, header []byte, body []byte, columnData []int)

Table 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL