markdown

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

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

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

Types

type HighlightedText

type HighlightedText struct{}

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

func (*HighlightedText) Rule

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

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"
)

Jump to

Keyboard shortcuts

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