parser

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package parser turns the source text into a sequence of blocks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormattedLineToHTML added in v1.0.2

func FormattedLineToHTML(hyphaName, input string) string

FormattedLineToHTML turns the given line of formatted text into HTML by lexing and parsing it in place.

TODO: separate all these steps.

func MakeFormatted added in v1.0.1

func MakeFormatted(firstLine, hyphaName string) blocks.Formatted

MakeFormatted parses the formatted text in the input and returns it.

func MakeHeading added in v1.0.1

func MakeHeading(line, hyphaName string, level uint) blocks.Heading

MakeHeading parses the heading on the given line and returns it. Set its level by yourself though.

func Parse

func Parse(ctx mycocontext.Context, out chan blocks.Block)

Parse parses the Mycomarkup document in the given context. All parsed blocks are written to out.

func TagFromState added in v1.0.1

func TagFromState(stt blocks.SpanKind, tagState map[blocks.SpanKind]bool) string

TagFromState returns an appropriate tag half (<left> or </right>) depending on tagState and also mutates it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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