Documentation ¶
Overview ¶
Package parser turns the source text into a sequence of blocks.
Index ¶
- func MakeFormatted(firstLine, hyphaName string) blocks.Formatted
- func MakeHeading(line, hyphaName string, level uint) blocks.Heading
- func Parse(ctx mycocontext.Context, out chan blocks.Block)
- func ParseImgFirstLine(line, hyphaName string) (img blocks.Img, imgFinished bool)
- func ProcessImgLine(img *blocks.Img, line string) (imgFinished bool)
- func ProcessImgRune(img *blocks.Img, r rune) (done bool)
- func ProcessInDescription(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func ProcessInDimensionsH(img *blocks.Img, r rune) (imgFinished bool)
- func ProcessInDimensionsW(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func ProcessInName(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func ProcessInRoot(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func PushImgEntry(img *blocks.Img)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeFormatted ¶ added in v1.0.1
MakeFormatted parses the formatted text in the input and returns it. Does it?
func MakeHeading ¶ added in v1.0.1
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
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
ProcessImgLine parses the line and tells if the gallery is finished.
func ProcessImgRune ¶ added in v1.0.4
ProcessImgRune parses the rune.
func ProcessInDescription ¶ added in v1.0.4
func ProcessInDimensionsH ¶ added in v1.0.4
func ProcessInDimensionsW ¶ added in v1.0.4
func ProcessInName ¶ added in v1.0.4
func ProcessInRoot ¶ added in v1.0.4
func PushImgEntry ¶ added in v1.0.4
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.