internal

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTagTemplate = "`{{tag}}`"

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code struct{}

Code replaces div tag stylized to look like code blocks with an actual <pre> tag

func (*Code) ReplaceTag

func (r *Code) ReplaceTag(n *html.Node)

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

func NewConverter(tagTemplate string, enableHighlights bool) (*Converter, error)

func (*Converter) Convert

func (c *Converter) Convert(note *enex.Note) (*markdown.Note, error)

Convert an Evernote file to markdown

type ExtraDiv

type ExtraDiv struct{}

ExtraDiv removes extra line break in tables and lists

func (*ExtraDiv) ReplaceTag

func (*ExtraDiv) ReplaceTag(n *html.Node)

ReplaceTag implements the TagReplacer interface

type Media

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

func NewReplacerMedia(resources map[string]markdown.Resource) *Media

NewReplacerMedia creates a Media TagReplacer using resources as a data source

func (*Media) ReplaceTag

func (r *Media) ReplaceTag(n *html.Node)

ReplaceTag implements the TagReplacer interface

type TagReplacer

type TagReplacer interface {
	ReplaceTag(node *html.Node)
}

TagReplacer allows manipulating HTML nodes in order to present custom tags correctly in Markdown format after conversion

type TextFormatter

type TextFormatter struct{}

TextFormatter catches bold and italic, bold takes precedence

func (*TextFormatter) ReplaceTag

func (*TextFormatter) ReplaceTag(n *html.Node)

ReplaceTag implements the TagReplacer interface

Jump to

Keyboard shortcuts

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