Static preview. Server-backed interactions are available only in a local checkout.

Carve Syntax & What is New

Carve is a lightweight markup language with one syntax, one meaning, and the same HTML from every implementation. This page shows the newest addition - inline literals - alongside the convergence behaviours worth knowing when you author Carve. Every sample below is rendered live through the syntax converter profile.

Inline literal

A ! before a code span renders its contents as literal text with no code styling - perfect for showing Carve syntax without it being interpreted or monospaced.

Carve source

Type !`*strong*` and !`/emphasis/` to show the raw delimiters, while `regular code` still gets a code box.

Rendered

Type *strong* and /emphasis/ to show the raw delimiters, while regular code still gets a code box.

Task list markers

Carve recognises done, dropped and deferred task states in addition to the plain checkbox.

Carve source

- [x] Ship the gallery
- [ ] Write the docs
- [-] Drop the old approach
- [>] Defer the polish

Rendered

  • Ship the gallery
  • Write the docs
  • Drop the old approach
  • Defer the polish

Ordered list markers

A bare dot is Carve’s preferred ordered-list marker. It stays aligned as numbering grows.

Carve source

. First item
. Second item
. Third item

Rendered

  1. First item
  2. Second item
  3. Third item

Table headers

The |= marker defines a header cell directly, without a Markdown separator row.

Carve source

|= Lang |= Status |
| PHP | ready |
| JS | ready |

Rendered

LangStatus
PHPready
JSready

Table cell alignment

Alignment goes in braces right after the cell marker: {<} left, {~} center, {>} right. A header cell sets its column, and a body cell can override it.

Carve source

|= Item |={>} Qty |={~} Note |
| Apple | 12 | fresh |
| Pear |{<} 3 | ripe |

Rendered

ItemQtyNote
Apple12fresh
Pear3ripe

Row and column spans

A cell holding only ^ merges into the cell above it (rowspan), and a cell holding only < merges into the cell to its left (colspan).

Carve source

|= Region |= Q1 |= Q2 |
| North | 10 | 12 |
| ^ | 11 | 13 |
| Total | 46 | < |

Rendered

RegionQ1Q2
North1012
1113
Total46

Table continuation rows

A row starting with + continues the row above: each non-empty cell is appended to the cell in the same column, so long cell text can wrap across source lines.

Carve source

|= Item |= Note |
| Apple | fresh from |
+ | the orchard |
| Pear | ripe |

Rendered

ItemNote
Applefresh from the orchard
Pearripe

Comments inside a list

A %% line comment between list items is dropped from the output and does not break the list or make it loose.

Carve source

- Install the package
%% TODO: link the release notes
- Publish the config
- Render

Rendered

  • Install the package
  • Publish the config
  • Render

Tight vs loose lists

Blank lines between items make a list loose: each item is wrapped in <p>, adding vertical rhythm. Without blank lines the list is tight and compact.

Carve source

Tight:

- one
- two
- three

Loose:

- one

- two

- three

Rendered

Tight:

  • one
  • two
  • three

Loose:

  • one

  • two

  • three

Definition lists

A term line starts with :: and each definition line starts with a colon and one space.

Carve source

:: Carve
: A lightweight markup language for structured documents.
:: Renderer
: An engine that turns Carve source into HTML, text, Markdown, or ANSI.

Rendered

Carve
A lightweight markup language for structured documents.
Renderer
An engine that turns Carve source into HTML, text, Markdown, or ANSI.

Continuation marker

A lone + attaches the next block to the open list item, quote, footnote or description, without indenting it. The list stays tight.

Carve source

- Install the package
+
> Run composer from the project root.
- Publish the config

Rendered

  • Install the package

    Run composer from the project root.

  • Publish the config

CSV and TSV tables

A {table} flag turns a csv or tsv fence into a table. The first record is the header, and RFC 4180 quoting lets a field hold a comma.

Carve source

{table}
```csv
Item,Qty,Note
Apple,12,fresh
"Pear, green",3,ripe
```

{table}
```tsv
Lang	Status
PHP	ready
```

Rendered

ItemQtyNote
Apple12fresh
Pear, green3ripe
LangStatus
PHPready

Dash-run and quote typography

Two hyphens become an en dash, three become an em dash, and three dots become an ellipsis. Straight quotes curl into typographic quotes.

Carve source

Pages 10--20 cover it -- but the details --- all of them --- come later... She said "it just works" and I agreed.

Rendered

Pages 10–20 cover it – but the details — all of them — come later… She said “it just works” and I agreed.

Footnotes

A reference like [^1] links to a definition collected into an endnotes section, with a back-link to where it was cited.

Carve source

Carve renders identically across every implementation.[^spec]

[^spec]: Guaranteed by a shared conformance corpus.

Rendered

Carve renders identically across every implementation.1


  1. Guaranteed by a shared conformance corpus.↩

Escaped block markers

A backslash keeps a block marker literal when it appears at the start of a line.

Carve source

This paragraph is real.

\#\#\# This stays literal

# This is a real heading

Rendered

This paragraph is real.

### This stays literal

This is a real heading