Repository navigation
Markdown
Viames Marino edited this page Oct 19, 2026
·
2 revisions
Pair\Helpers\Markdown is a lightweight Markdown-to-HTML converter.
It supports a focused subset for fast rendering and safe output.
Converts markdown text into HTML.
Supported features include:
- headings
- emphasis/strong
- links/images with URL sanitization
- inline/code blocks
- lists
- tables
- basic block structures
- HTML-sensitive characters are escaped
- relative URLs and fragments are accepted; explicit schemes are limited to
http,https,mailto, andtel - dangerous schemes (e.g.
javascript:) are rejected - fragment links are resolved against the current router URL, so they require an initialized application/router
- this is a focused Markdown subset, not a complete CommonMark implementation
use Pair\Helpers\Markdown;
$md = "# Title\n\nVisit [Pair](https://example.com).";
$html = Markdown::toHtml($md);Render table markdown:
$md = "| Name | Value |\n|:-----|------:|\n| A | 10 |";
$html = Markdown::toHtml($md);See also: TemplateRenderer, Utilities, View.
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4