hydephp/torchlight-commonmark
Adds Torchlight syntax highlighting to the CommonMark PHP parser. It swaps the default code block renderer so fenced code blocks are sent to Torchlight's API and rendered with highlighting, line numbers, diffs, and other features.
league/commonmark, the parser the Laravel ecosystem already standardizes on.Consider it when:
torchlight/torchlight-commonmark-php constraints block the upgrade.Look elsewhere when:
To executives: This is a small, MIT-licensed adapter that lets us render highlighted code server-side on Laravel 11 with minimal engineering effort. The package is free; the cost is Torchlight's API subscription and a dependency on a low-adoption fork. It unblocks the Laravel 11 upgrade for content-heavy surfaces without a rewrite.
To engineering: Drop-in CommonMark extension; we should wrap it behind our own rendering interface so we can swap to upstream, Shiki, or a self-hosted highlighter later. Pin the version, confirm the Laravel 11 constraint issue actually affects our composer.json before adopting, and set a review checkpoint on fork maintenance. Do not adopt it as a permanent, unexamined dependency — treat it as a bridge with a documented exit path.
How can I help you explore Laravel packages today?