xtxt-js
v0.3.0
Published
Parser and renderer for the XTXT plain-text document format
Maintainers
Readme
xtxt-js
Parser, validator, extractor and HTML renderer for the XTXT plain-text document format. Dependency-free ESM, runs in Node and the browser.
import { parse, validate, extract, renderHTML } from 'xtxt-js';
const { doc, issues } = parse(source);
for (const i of validate(doc)) console.log(i.line, i.severity, i.message);
const data = extract(doc); // outline, tasks, blocks, links, media, code
const html = renderHTML(doc, { full: true });This is a port of the Go reference implementation, not a binding. Both are
checked against the same fixtures in conformance/.
