Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Markdown Laravel Package

tempest/markdown

A fast, extensible server-side Markdown parser for PHP that uses a simple lexer instead of regex. Built-in support for code highlighting, tables, divs, responsive images, and frontmatter, with benchmarks well ahead of commonmark and Parsedown Extra.

View on GitHub
Deep Wiki
Context7

Fast and extensible Markdown in PHP

tempest/markdown is a Markdown parser for server-side Markdown parsing with PHP. It's designed to be fast and extensible, and has a bunch of extended Markdown features built-in like code highlighting, table and div support, responsive images, and frontmatter support.

[!IMPORTANT] This package is still a work in progress! Feel free to open issues.

Quickstart

composer require tempest/markdown

Render Markdown like this:

use Tempest\Markdown\Markdown;

$markdown = new Markdown();

$parsed = $markdown->parse(file_get_contents('README.md'));

echo $parsed->frontmatter['title'];
echo $parsed->html;

You can read more in the docs.

Performance

This package began as a challenge to make a more performant Markdown parser in pure PHP. The primary performance gain is from not relying on regex but instead using a simple lexer to tokenize Markdown files and convert them to HTML.

Benchmarks are included in this repo and can be run with composer bench after installing all dev dependencies. Here are the results on my machine for rendering the full Tempest docs:

Package Memory Time to parse
tempest/markdown 6.664mb 10.906ms
league/commonmark 21.114mb 56.993ms
michelf/php-markdown 7.343mb 23.215ms
erusev/parsedown-extra 8.485mb 15.163ms
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel