Textlane
Textlane is a Rust-native text processing pipeline: a replacement for unified whose plugins run natively, while existing JavaScript plugins can still join the same pipeline. One Rust crate ships to crates.io, npm and PyPI at one version.
Installation
Usage
A processor chains plugins with use, as unified does, then parses, transforms and serializes
text with process. Each language reaches the same crate; plugins are grouped by domain (md,
html, mdx, nl) and named as the pipeline names them.
Rust:
use ;
let processor = new
.with
.with
.with
.with
.freeze?;
assert_eq!;
Node.js:
import from "textlane"
import * as html from "textlane/html"
import * as md from "textlane/md"
const file = await
.
.
.
.
.
file. // "<h1>hi</h1>"
Python:
=
# "<h1>hi</h1>"
Node.js and Python also offer parse, run, stringify, data and freeze, with
Node.js's process/run returning a Promise beside processSync/runSync, and Python's
returning the result beside the coroutines aprocess/arun.
Errors carry the crate's code, such as unknown-plugin. A JavaScript or Python function
joins a pipeline as a unified attacher returning a transformer; it cannot add syntax, a parser
or a compiler.
Documentation
Read the docs at textlane.dev.
License
MIT.