v5 – git.sr.ht/~bouncepaw/mycomarkup/v5 Index | Files | Directories

package mycomarkup

import "git.sr.ht/~bouncepaw/mycomarkup/v5"

Package mycomarkup provides an API for processing Mycomarkup-formatted documents.

Index

Functions

func BlockTree

func BlockTree(ctx mycocontext.Context, visitors ...func(block blocks.Block)) []blocks.Block

BlockTree returns a slice of blocks parsed from the Mycomarkup document contained in ctx.

Pass visitors. Visitors are functions (usually closures) that are called on every top-level found block.

Some pre-implemented visitors are in the tools package.

func BlocksToHTML

func BlocksToHTML(ctx mycocontext.Context, ast []blocks.Block) string

BlocksToHTML turns the blocks into their HTML representation.

Source Files

mycomarkup.go

Directories

PathSynopsis
blocksPackage blocks provides some of the Mycomarkup's blocks.
cmd
cmd/mycomarkup
genhtmlPackage genhtml provides utilities for converting Mycomarkup blocks into HTML documents.
genhtml/tagPackage tag provides the data type for (X)HTML tags/DOM nodes.
links
mycocontextPackage mycocontext provides a context type for all things Mycomarkup.
optionsPackage options provides a configuration data structure to pass when invoking the Mycomarkup parser.
parserPackage parser turns the source text into a sequence of blocks.
parser/ctxioPackage ctxio provides input and output operations on the input buffer in mycocontext.Context.
temporary_workaroundPackage temporary_workaround is a temporary workaround to break import cycle for some transclusion tricks.
toolsPackage tools provides visitors for external usage and will provide other tools one day.
utilPackage util provides simple utility functions usable in all modules.
util/linesPackage line provides a datatype for text lines that are generated by package tag.
Version
v5.6.0 (latest)
Published
Nov 29, 2023
Platform
linux/amd64
Imports
7 packages
Last checked
28 minutes ago

Tools for package owners.