kjelsrud.dev/node_modules/retext-stringify/lib/index.js
2023-07-19 21:31:30 +02:00

15 lines
350 B
JavaScript

/**
* @typedef {import('nlcst').Root} Root
*/
import {toString} from 'nlcst-to-string'
/** @type {import('unified').Plugin<void[], Root, string>} */
export default function retextStringify() {
Object.assign(this, {Compiler})
}
/** @type {import('unified').CompilerFunction<Root, string>} */
function Compiler(tree) {
return toString(tree)
}