markdown

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert added in v0.2.0

func Convert(w io.Writer, r io.Reader, highlights, escapeSpecialChars bool) error

Convert wraps a call to external dependency to provide stable interface for package users

Types

type HighlightedText added in v0.15.0

type HighlightedText struct{}

HighlightedText is a parsing rule to convert Evernote highlights to HTML spans with a background color

func (*HighlightedText) Rule added in v0.15.0

Rule implements godown.CustomRule interface to extend basic conversion rules and convert text highlighted in Evernote to an inline HTML `span` tag with a custom background color

type Note

type Note struct {
	Content []byte
	Media   map[string]Resource
	CTime   time.Time
	MTime   time.Time
}

Note is a markdown representation of valuable knowledge that combines media resources and text represented in markdown format

type Resource

type Resource struct {
	Name    string
	Type    ResourceType
	Content []byte
}

Resource is a media resource related to a markdown note

type ResourceType added in v0.3.0

type ResourceType string

ResourceType gives a hint on the way to represent Resource

const (
	// Image can be displayed using common ![]() syntax
	Image ResourceType = "image"
	// File should be referenced as an external resource []()
	File ResourceType = "file"
)

type TodoItem added in v0.18.0

type TodoItem struct{}

TodoItem is a parsing rule to convert Evernote checkboxes to corresponding GitHub Flavoured Markdown items

func (TodoItem) Rule added in v0.18.0

func (r TodoItem) Rule(next godown.WalkFunc) (string, godown.WalkFunc)

Rule implements godown.CustomRule interface to handle Evernote-specific "en-todo" tag It converts the tag to a Markdown format with correct "checked" state

Jump to

Keyboard shortcuts

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