package mycomarkup
import "git.sr.ht/~bouncepaw/mycomarkup/v5"
Package mycomarkup provides an API for processing Mycomarkup-formatted documents.
Index ¶
- func BlockTree(ctx mycocontext.Context, visitors ...func(block blocks.Block)) []blocks.Block
- func BlocksToHTML(ctx mycocontext.Context, ast []blocks.Block) string
Functions ¶
func BlockTree ¶
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 ¶
Directories ¶
Path | Synopsis |
---|---|
blocks | Package blocks provides some of the Mycomarkup's blocks. |
cmd | |
cmd/mycomarkup | |
genhtml | Package genhtml provides utilities for converting Mycomarkup blocks into HTML documents. |
genhtml/tag | Package tag provides the data type for (X)HTML tags/DOM nodes. |
links | |
mycocontext | Package mycocontext provides a context type for all things Mycomarkup. |
options | Package options provides a configuration data structure to pass when invoking the Mycomarkup parser. |
parser | Package parser turns the source text into a sequence of blocks. |
parser/ctxio | Package ctxio provides input and output operations on the input buffer in mycocontext.Context. |
temporary_workaround | Package temporary_workaround is a temporary workaround to break import cycle for some transclusion tricks. |
tools | Package tools provides visitors for external usage and will provide other tools one day. |
util | Package util provides simple utility functions usable in all modules. |
util/lines | Package 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.