mark

package
v0.0.0-...-ec6453d Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package mark provides a simple markdown text format.

Index

Constants

View Source
const (
	B Tag = 1 << iota
	I
	M
	A

	H1
	H2
	H3
	H4
	HR
	P

	Text   = Tag(0)
	Style  = B | I | M | A
	Header = H1 | H2 | H3 | H4
	Block  = HR | P
	All    = Style | Header | Block
)

Variables

This section is empty.

Functions

This section is empty.

Types

type El

type El struct {
	Tag  Tag
	Cont string
	Els  []El
}

func Inline

func Inline(txt string) ([]El, error)

func Parse

func Parse(txt string) ([]El, error)

type Tag

type Tag uint

func (Tag) Inline

func (tag Tag) Inline(txt string) (res []El, _ error)

func (Tag) Parse

func (tag Tag) Parse(txt string) (res []El, err error)

Jump to

Keyboard shortcuts

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