Add plannotator extension v0.19.10

This commit is contained in:
2026-05-07 11:38:14 +10:00
parent e914bc59c9
commit f37e4565ff
91 changed files with 35103 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
// @generated — DO NOT EDIT. Source: packages/shared/html-to-markdown.ts
/**
* HTML-to-Markdown conversion via Turndown.
*
* Shared between the CLI (single HTML file / URL) and the server
* (on-demand conversion for HTML files in folder mode).
*/
import TurndownService from "turndown";
// @ts-expect-error — @joplin/turndown-plugin-gfm ships JS only, no .d.ts (see declarations.d.ts for local types)
import { gfm } from "@joplin/turndown-plugin-gfm";
const td = new TurndownService({
headingStyle: "atx",
codeBlockStyle: "fenced",
bulletListMarker: "-",
});
td.use(gfm);
// Strip <style> and <script> tags entirely (Turndown keeps unrecognised
// tags as blank by default, but their text content can leak through).
td.remove(["style", "script", "noscript"]);
/**
* Convert an HTML string to Markdown.
*
* Uses a module-level TurndownService singleton (stateless, safe to reuse).
* GFM tables, strikethrough, and task lists are supported via turndown-plugin-gfm.
*/
export function htmlToMarkdown(html: string): string {
return td.turndown(html);
}