Deterministic parsing
Physical indentation defines block structure, and inline scanning precomputes delimiter and bracket pairs instead of rescanning failed matches.
Zero-backtracking inline scanning, a typed AST, staged plugins, and semantic HTML rendering.
Physical indentation defines block structure, and inline scanning precomputes delimiter and bracket pairs instead of rescanning failed matches.
AST nodes keep one-based lines and columns plus zero-based source ranges. Task items also record the exact offset of their state character.
walkAST provides enter, leave, skip, remove, and replace while enforcing the structural rules of lists and the document root.
Compile the AST to accessible semantic markup with strict escaping, URL allowlisting, renderer overrides, and a standalone stylesheet.
Block rules, pipe modifiers, AST transforms, and renderer overrides each have a defined contract and composition order.
HTML output escapes text and attributes and filters unsafe URLs. Custom renderers and plugins remain trusted application code.
import { parseFluxMark, renderToHTML } from 'fluxmark'
import 'fluxmark/styles.css'
const source = `# Release notes
FluxMark renders [structured content|b] to semantic HTML.
* [x] Parse the document
* [ ] Publish the package
`
const ast = parseFluxMark(source)
const html = renderToHTML(source)
console.log(ast.children.length, ast.issues, html)Install FluxMark and run the first example, or read the language syntax.
The Playground runs the compiler in the browser and shows semantic HTML and the transformed AST for the same source.
Open the Playground to edit the source and inspect each output.