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