@nandithebull/myst-oxa
v0.1.8
Published
MyST Markdown <-> OXA document parse/render pipeline
Maintainers
Readme
@nandithebull/myst-oxa
MyST Markdown <-> OXA document parse/render pipeline.
Install
npm install @nandithebull/myst-oxaAPI
import { parse, render, toOxa, fromOxa } from "@nandithebull/myst-oxa";parse(mystText: string): MdastTree
Parse MyST markdown to an mdast tree.
render(title: string, mystText: string): string
Render MyST markdown to HTML. Includes dropdown admonition handling and executable code cell wrapping (for Jupyter integration).
toOxa(title: string, mystText: string): Promise<OxaRecord>
Convert MyST markdown to an OXA document record (async). Validates the output against the OXA lexicon schema via @panproto/core.
fromOxa(record: OxaRecord): string
Convert an OXA document record back to MyST markdown.
Types
All document types are exported:
import type { OxaDocument, OxaBlock, OxaInline, MystDocument, MystBlock, MystInline } from "@nandithebull/myst-oxa";Lower-level API
The lens API and schema objects are also exported for advanced use:
import { panproto, lens, mystDocumentSchema, oxaDocumentSchema } from "@nandithebull/myst-oxa";License
MIT
