Search by

markup-carve / tempest-highlight-carve

dereuromark

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

Statistics

Installs: 104

Dependents: 1

Suggesters: 1

Stars: 0

Open Issues: 1

0.1.4 2026-11-12 11:09 UTC

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.