webuni/commonmark-attributes-extension
Adds Kramdown-style attribute lists to League/CommonMark markdown, letting you assign HTML ids, classes, and other attributes to block and span elements. Deprecated: use the built-in Attributes extension in league/commonmark 1.5+ instead.
{.class}text{} syntax, reducing reliance on raw HTML. Aligns with user-friendly content tools (e.g., wikis, docs, or CMS platforms) where non-technical users need styling/semantic control.webuni/commonmark-attributes-extension to league/commonmark v1.5+, eliminating technical debt and standardizing on a maintained, feature-rich parser. Supports Laravel’s long-term roadmap for PHP 8.x+ compatibility.{#toc}) are natively supported. Critical for developer tools or open-source projects competing on markdown flexibility.league/commonmark’s batteries-included approach (attributes, tables, footnotes) instead of piecemeal extensions. Reduces integration complexity and maintenance burden.{.admonition}Warning{}).{.chart}data{} → auto-generate graphs via JavaScript).aria-* attributes to Markdown for screen readers (e.g., {: aria-label="Download"}link{}).Do Adopt If:
league/commonmark <1.5 and need attribute support immediately (e.g., for a legacy system with no upgrade path).league/commonmark v1.5+.Look Elsewhere If:
league/commonmark v1.5+: The native Attributes extension is superior (actively maintained, no deprecation risk).league/commonmark instead.league/commonmark directly or use a higher-level tool (e.g., Markdown + JavaScript post-processing).league/commonmark v1.5+ is low-risk but requires coordination.For Executives:
*"This package is a stopgap, not a long-term solution. Right now, it lets our content team add HTML classes/IDs directly in Markdown (e.g., {.highlight}code{}), which improves authoring workflows without requiring HTML knowledge. However, it’s deprecated—its functionality is already built into the newer version of league/commonmark (v1.5+), which we should adopt to:
For Engineers:
*"Avoid this package. It’s deprecated, and its features are already in league/commonmark v1.5+ under League\CommonMark\Extension\Attributes. Here’s the drop-in replacement:
composer.json:
"league/commonmark": "^1.5"
// Old (deprecated)
$environment->addExtension(new \Webuni\CommonMark\AttributesExtension\AttributesExtension());
// New (recommended)
$environment->addExtension(new \League\CommonMark\Extension\Attributes\AttributesExtension());
Why this matters:
For Content/Design Teams:
"This change lets you keep using Markdown attributes (like {.button}Click Me{}) but on a more reliable system. No learning curve—just better stability. Behind the scenes, we’re switching to a newer library that’s actively improved, so your workflow stays the same while our tech stack gets an upgrade. Win-win!"
How can I help you explore Laravel packages today?