Get Started
Use the Playground without installing anything. The Cheat Sheet lists the syntax.
Install a renderer
The JavaScript, PHP, and Rust implementations are tested with the same Carve documents and expected output.
JavaScript / TypeScript — carve-js
npm install @markup-carve/carveimport { carveToHtml } from '@markup-carve/carve'
const html = carveToHtml('/italic/, *bold*, and a heading')The package also exposes parse and Markdown, plain-text, and ANSI renderers.
Rust — carve-rs
cargo install carve-lang# CLI: convert a .crv file to HTML
carve input.crvBrowser / Node via WebAssembly — carve-wasm
carve-wasm wraps carve-rs. See its repository for the current browser and server-side JavaScript APIs.
PHP — carve-php
composer require markup-carve/carve-phpuse MarkupCarve\Carve\CarveConverter;
$html = (new CarveConverter())->convert('/italic/, *bold*, and a heading');CarveConverter::convert() returns HTML. The package also provides parse, other output formats, and format converters.
Language bindings
These bindings use carve-rs:
| Language | Project | Install |
|---|---|---|
| Python | carve-py | from Git (PyPI pending) |
| Ruby | carve-rb | gem install carve-lang |
| Go | carve-go | go get github.com/markup-carve/carve-go |
Editor and framework integrations are listed in the Ecosystem.
Read the reference
- Cheat Sheet: syntax reference.
- Examples: Carve source and HTML output.
- Formal Grammar: the rules that define valid block and inline syntax.
- Migration from Markdown: incompatible syntax and conversion.
Features available by default and optional features
Headings, lists, tables, links, code, math, footnotes, callouts, and attributes are available without configuration.
A few features must be enabled separately:
- Available everywhere, but opt-in — citations
[@key], bare-URL autolinking, mention/tag → URL templates, a collapsibledetailswidget,list-table. Enable them in your parser configuration. - Dependent on the implementation — for example Mermaid diagrams, a table of contents, and heading permalinks. Register the ones you want.
The :name[…] inline form and ::: name block form are always recognized. An application can register code that changes the output for a name. Without that code, the content renders as an ordinary span or div. See the optional features table.
Build your own parser
Start with Build Your Own Implementation and the Formal Grammar.
File extension: .crv