A lightweight JavaScript library based on annotatedtext, remark-parse, and remark-frontmatter for converting markdown documents into an annotated text format consumable by LanguageTool as AnnotatedText.
Front matter is now tagged as markup.
For details, please see https://www.prosegrinder.com/annotatedtext-remark.
This package is
ESM only.
Node 12+ is needed to use it, and it must be import
ed instead of require
d.
npm:
npm install annotatedtext-remark
Use build
to convert valid Markdown into
AnnotatedText.
import { build } from "annotatedtext-remark";
const text = "# Hello World\n\nThis is a paragraph.";
const annotatedtext = build(text);
const ltdata = JSON.stringify(annotatedtext);