parser

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 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 MakeFormatted added in v1.0.1

func MakeFormatted(firstLine, hyphaName string) blocks.Formatted

MakeFormatted parses the formatted text in the input and returns it. Does 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 ParseImgFirstLine added in v1.0.4

func ParseImgFirstLine(line, hyphaName string) (img blocks.Img, imgFinished bool)

ParseImgFirstLine parses the image gallery on the line and returns it. It also tells if the gallery is finished or not.

func ProcessImgLine added in v1.0.4

func ProcessImgLine(img *blocks.Img, line string) (imgFinished bool)

ProcessImgLine parses the line and tells if the gallery is finished.

func ProcessImgRune added in v1.0.4

func ProcessImgRune(img *blocks.Img, r rune) (done bool)

ProcessImgRune parses the rune.

func ProcessInDescription added in v1.0.4

func ProcessInDescription(img *blocks.Img, r rune) (shouldReturnTrue bool)

func ProcessInDimensionsH added in v1.0.4

func ProcessInDimensionsH(img *blocks.Img, r rune) (imgFinished bool)

func ProcessInDimensionsW added in v1.0.4

func ProcessInDimensionsW(img *blocks.Img, r rune) (shouldReturnTrue bool)

func ProcessInName added in v1.0.4

func ProcessInName(img *blocks.Img, r rune) (shouldReturnTrue bool)

func ProcessInRoot added in v1.0.4

func ProcessInRoot(img *blocks.Img, r rune) (shouldReturnTrue bool)

func PushImgEntry added in v1.0.4

func PushImgEntry(img *blocks.Img)

PushImgEntry pushes the most recent entry of Img to Img.Entries and creates a new entry. What an ugly function!

Types

This section is empty.

Jump to

Keyboard shortcuts

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