Skip to main content

tree-sitter-carve

Tree-sitter grammar for Carve, a post-Markdown lightweight markup language with visual mnemonics.

This grammar is built from the proven Djot Tree-sitter scanner architecture and changes the public syntax to Carve:

  • /italic/, *bold*, and /*bold italic*/
  • =highlight=, plus the braced-only {^superscript^} and {,subscript,} (a bare ^ or , is literal text)
  • $ + backtick math spans, and $$ + backtick display math spans
  • :name[content] inline extensions, @mentions, #tags, and :emoji:
  • %% line comments, trailing inline %% comments, and %%% fenced comments
  • Djot-style blocks retained where Carve keeps them: headings, lists, tables, fenced code, links, images, attributes, footnotes, captions, and divs

Development

git clone --recurse-submodules https://github.com/markup-carve/tree-sitter-carve
npm install
npm run generate
npm test

If you cloned without --recurse-submodules, fetch the shared spec corpus with git submodule update --init.

Shared-corpus conformance

The canonical Carve spec corpus is vendored as a git submodule at spec/ (spec/tests/corpus/NN-slug.crv). Two checks run it against this grammar:

npm run test:coverage    # every spec category is classified (covered or skip)
npm run test:conformance # every covered category parses with no ERROR/MISSING
npm run test:corpus      # both, in order

test/coverage.json is the coverage matrix. A category is covered when the grammar parses every one of its corpus inputs cleanly; otherwise it is listed in skip with a reason recording the unmodeled construct. Adding a new spec category (after bumping the submodule) fails test:coverage until it is classified, which is intentional: it forces a decision rather than silently dropping coverage.

Status

Initial grammar. It is intended for editor support and structural parsing. The Carve conformance corpus remains the source of truth for renderer behavior.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_carve-0.1.3.tar.gz (480.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_carve-0.1.3-cp38-abi3-win_amd64.whl (140.2 kB view details)

Uploaded CPython 3.8+Windows x86-64

tree_sitter_carve-0.1.3-cp38-abi3-win32.whl (141.3 kB view details)

Uploaded CPython 3.8+Windows x86

tree_sitter_carve-0.1.3-cp38-abi3-musllinux_1_2_x86_64.whl (232.5 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

tree_sitter_carve-0.1.3-cp38-abi3-musllinux_1_2_i686.whl (233.1 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ i686

tree_sitter_carve-0.1.3-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (240.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_carve-0.1.3-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (237.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

tree_sitter_carve-0.1.3-cp38-abi3-macosx_11_0_arm64.whl (151.6 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file tree_sitter_carve-0.1.3.tar.gz.

File metadata

  • Download URL: tree_sitter_carve-0.1.3.tar.gz
  • Upload date:
  • Size: 480.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tree_sitter_carve-0.1.3.tar.gz
Algorithm Hash digest
SHA256 36226482dbbd441a8beb9445b396c1ca5f2df2b2377e4ee92b1a0c261508ab2d
MD5 18aea6f5b100cce63ad46c7c68c6422f
BLAKE2b-256 dca03da03a19319cb2a01326571795a2040293bf88de747bd71b03f4b2f66f44

See more details on using hashes here.

File details

Details for the file tree_sitter_carve-0.1.3-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_carve-0.1.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 53dde3e02e5bf7498eb1859f856cb3866bc551623b09b52859df9ff49c1162ec
MD5 db2757a79effa5513f73a03b60c8da4c
BLAKE2b-256 b65d4ec0b818bf35d3b71bb84b09b5382039c98c9c58ebc86b5087df63517fca

See more details on using hashes here.

File details

Details for the file tree_sitter_carve-0.1.3-cp38-abi3-win32.whl.

File metadata

File hashes

Hashes for tree_sitter_carve-0.1.3-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 4c77c7b0050ec251f92349d1d785f6bbcbde5c6fa7de6667df07278b951ad713
MD5 c0800fc945f5ed92ea9e71e3c28aa798
BLAKE2b-256 89efcac41117757dfe42933a83140bbc8cacaa3a7d920b14dcd137b49fa606ef

See more details on using hashes here.

File details

Details for the file tree_sitter_carve-0.1.3-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_carve-0.1.3-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 458e5ee17a4da76981a883d190ccd7eaca995948bfbccdafe71f41af87852ff6
MD5 eadc8b66156f5dce7c35d12941c385ba
BLAKE2b-256 1e0f439229942a94dc6b5bdea1391d648e0fefc79d4c22f0336fae0c6a26dc5f

See more details on using hashes here.

File details

Details for the file tree_sitter_carve-0.1.3-cp38-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for tree_sitter_carve-0.1.3-cp38-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 bf98545fcfac30ee0d5739055700676f83e7494c6a32ee198f2f534784fced63
MD5 6412983314ff103f6114ca8748e8089e
BLAKE2b-256 b3651d48a4e59978d9d2bd7e2a58271da3f7e2ca7c6969dadf317e82961b503b

See more details on using hashes here.

File details

Details for the file tree_sitter_carve-0.1.3-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_carve-0.1.3-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b112f9945454c7af0e23ea09c585524a5fc11d3923c05493f412ba80dbfc97c6
MD5 04e2332104efdd09d030941d2e763e91
BLAKE2b-256 a7676d8e782620fabf6fc6f7c50e4a8d9db0de13665487b1545458344c24a1e8

See more details on using hashes here.

File details

Details for the file tree_sitter_carve-0.1.3-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for tree_sitter_carve-0.1.3-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 80e737ae8fe881b9c464ddc50e65ffc072480a132d5b0e16f895a12b6d05e7c4
MD5 e8e66197f117e76789596bf829c91e0c
BLAKE2b-256 8c50d0806dff93ff699ad6601aaeb7ee0f10b625e88dd76ed3d76a673c617146

See more details on using hashes here.

File details

Details for the file tree_sitter_carve-0.1.3-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_carve-0.1.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38021bdb82e395cc95fad9617c71e50234922ffc5e7d0abc79101b86a4971e73
MD5 fbf12483a93616f720509e2e255b6dfd
BLAKE2b-256 9f2de90d82be5ac3f70f19c495d9abc0b5f8e9480a2766d8b7b0d9a589ff1a38

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

8 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page