markup-carve / tempest-highlight-carve
Carve markup language support for tempest/highlight: server-side syntax highlighting for .crv source.
Package info
github.com/markup-carve/tempest-highlight-carve
pkg:composer/markup-carve/tempest-highlight-carve
Requires
- php: >=8.4
- tempest/highlight: ^2.28
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: *
- php-collective/code-sniffer: ^0.6
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.5 || ^12.0 || ^13.0
- squizlabs/php_codesniffer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-04 04:58:19 UTC
README
Carve 0.2 syntax highlighting for Tempest Highlight. Register CarveLanguage and select carve or crv.
use MarkupCarve\TempestHighlight\CarveLanguage; use Tempest\Highlight\Highlighter; $html = (new Highlighter())->addLanguage(new CarveLanguage())->parse($source, 'carve');
The 0.2 scope inventory is checked by tests/CarveLanguageTest.php.
CSV and TSV fences receive field and separator highlighting through the built-in injections. Separator tokens use hl-operator; add a rule for that class if your theme does not color it. Other code-fence bodies remain unstyled under the carve-code class.
.hl-operator { color: #c2410c; }
The highlighter uses flat patterns, so it cannot track arbitrary container depth or parser state. The pattern examples in tests/PatternAttributesTest.php cover the syntax it recognizes.