UNPKG

@notatki/preview

Version:

A collection of tools for creating and syncing Anki notes from simple text files.

10 lines 523 B
import { Output } from "@notatki/core"; import { CardTemplates } from "./card-templates.js"; import { expandPreviewOptions } from "./preview-options.js"; import { PreviewRenderer } from "./preview-renderer.js"; export function generatePreview(notes, options = {}, renderer = new PreviewRenderer(), templates = new CardTemplates(notes.types)) { const out = new Output(); renderer.render({ options: expandPreviewOptions(options), templates, notes, out }); return String(out); } //# sourceMappingURL=preview.js.map