@traq-flavored-markdown/extensions-plugin
v0.3.0
Published
Markdown table, math, mark, strikethrough and linkify extensions.
Readme
Markdown extensions
This owner supplies optional math, table, mark, strikethrough, and linkify features. It is separate from CommonMark and from the traQ display profile.
Display math accepts $$ after zero to three spaces of indentation, relative to
its enclosing list or quote. A closing $$ followed only by whitespace closes
both single-line and multiline formulas; subsequent text stays outside the
formula. Indented and fenced code blocks retain their usual interpretation.
| Crate | Purpose |
| ------------------------------- | ------------------------------- |
| markdown-extensions-contracts | Typed extension node payloads |
| markdown-extensions-syntax | Optional syntax implementations |
| markdown-extensions-text | Plain-text handlers |
The TypeScript package @traq-flavored-markdown/extensions-plugin exports
/nodes, /renderer, and /math. plugin({ math }) registers typed HTML
handlers. Without a math adapter it preserves escaped source. /math supplies
the optional KaTeX adapter; node-only and custom-renderer consumers do not need
to install or load it. katex is an optional peer dependency.
Import @traq-flavored-markdown/extensions-plugin/index.css for the base markup
styles. KaTeX users also import katex/dist/katex.min.css. Generated /nodes
exports schema; createRenderer(preset, { schema }) validates raw trees
independently of handler selection.
Table column alignments belong to the table. Header rows and body rows are distinct node kinds, and cells derive their presentation from the table and their sibling index. Table, row, and cell handlers all use the core dispatcher, so ancestry, handler replacement, omission, and child text replacement follow the same rules as other nodes.
The implementation, Rust crates, generated Go package, codegen group, and
persisted node kinds consistently use extensions. The SDK chooses the feature
set and grammar precedence.
