markup-carve / carve-php
PHP parser for Carve, a human-centered lightweight markup language derived from djot-php.
Fund package maintenance!
Requires
- php: ^8.2
Requires (Dev)
- nikic/php-fuzzer: ^0.0.11
- php-collective/code-sniffer: dev-master
- phpstan/phpstan: ^2.1.32
- phpunit/phpunit: ^11.0 || ^12.0 || ^13.0
Suggests
- ext-intl: Recommended for heading-ID transliteration: enables ICU romanization of non-Latin scripts (e.g. CJK, Arabic). Without it, a baked map covers Latin/Cyrillic/punctuation identically and other scripts fall back to the generated `section` id.
This package is not auto-updated.
Last update: 2026-05-24 01:00:21 UTC
README
PHP parser and renderer for Carve, a post-Djot lightweight markup language with visual mnemonics and human-centered design.
Warning
Alpha — syntax fork in progress.
This repository was forked from php-collective/djot-php on 2026-05-13 and is being adapted to Carve syntax. While the migration is in flight, the parser still recognises Djot syntax in most places. Do not depend on the API yet.
Status
The Carve\ namespace and class names are in place. The actual Carve syntax rules (delimiter swaps, table changes, captions, custom extension syntax) are being applied in tracked steps — see the project roadmap.
Origins
Carve-PHP is a hard fork of djot-php by the PHP Collective. The fork preserves the architecture, AST, renderer pipeline, profiles, and extensions, and replaces Djot's syntax rules with Carve's. The MIT license carries over; copyright lines remain in LICENSE.
For the original Djot implementation, use php-collective/djot instead.
Installation
composer require markup-carve/carve-php
Usage
use Carve\CarveConverter; $converter = new CarveConverter(); $html = $converter->toHtml('# Hello /Carve/');
License
MIT — see LICENSE.