@rshirohara/rekurke-stringify
Version:
rekurke plugin to add support for serializing kakuyomu novel format.
14 lines (12 loc) • 467 B
text/typescript
import type { Root as KkastRoot } from "@rshirohara/kkast";
import type { Plugin, Processor } from "unified";
import { toKakuyomuNovel } from "./lib/index.js";
export const rekurkeStringify: Plugin<[], KkastRoot, string> = function (
this: Processor,
) {
const compiler = (doc: KkastRoot) => {
return toKakuyomuNovel(doc);
};
// biome-ignore lint/style/useNamingConvention: interface defined in external module
Object.assign(this, { Compiler: compiler });
};