Documentation ¶
Index ¶
Constants ¶
const DefaultTagTemplate = "`{{tag}}`"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶ added in v0.15.0
type Code struct{}
Code replaces div tag stylized to look like code blocks with an actual <pre> tag
func (*Code) ReplaceTag ¶ added in v0.15.0
ReplaceTag implements the TagReplacer interface
type Converter ¶
type Converter struct { TagTemplate string EnableHighlights bool // contains filtered or unexported fields }
Converter holds configuration options to control conversion
func NewConverter ¶ added in v0.15.0
type EmptyAnchor ¶ added in v0.15.0
type EmptyAnchor struct{}
EmptyAnchor removes anchor tags without text
func (*EmptyAnchor) ReplaceTag ¶ added in v0.15.0
func (*EmptyAnchor) ReplaceTag(n *html.Node)
ReplaceTag implements the TagReplacer interface
type ExtraDiv ¶ added in v0.15.0
type ExtraDiv struct{}
ExtraDiv removes extra line break in tables and lists
func (*ExtraDiv) ReplaceTag ¶ added in v0.15.0
ReplaceTag implements the TagReplacer interface
type Media ¶ added in v0.15.0
type Media struct {
// contains filtered or unexported fields
}
Media tag replacer puts a standard HTML <img> tag instead of custom <en-media> tag if it is an image and <a> tag for everything else to be able to download it as a file
func NewReplacerMedia ¶ added in v0.15.0
NewReplacerMedia creates a Media TagReplacer using resources as a data source
func (*Media) ReplaceTag ¶ added in v0.15.0
ReplaceTag implements the TagReplacer interface
type TagReplacer ¶ added in v0.15.0
TagReplacer allows manipulating HTML nodes in order to present custom tags correctly in Markdown format after conversion
type TextFormatter ¶ added in v0.15.0
type TextFormatter struct{}
TextFormatter catches bold and italic, bold takes precedence
func (*TextFormatter) ReplaceTag ¶ added in v0.15.0
func (*TextFormatter) ReplaceTag(n *html.Node)
ReplaceTag implements the TagReplacer interface