ALTO Markdown converts Markdown to safe HTML and keeps a source-backed document model when an application needs to inspect, lint, or edit content. Use direct conversion for one result; open a document when later work depends on its structure.
<?php
use Alto\Markdown\Markdown;
$html = Markdown::github()->toHtml("# Hello\n\nWelcome.\n");The conversion returns <h1>Hello</h1> followed by a paragraph containing
Welcome.. Raw HTML is escaped and unsafe URL schemes are rejected by default.
Documentation
- Installation: install the package and verify the runtime.
- Getting started: render and inspect one document.
- Conversion: produce HTML or Markdown output.
- Documents: inspect, query, measure, and edit parsed documents.
- Quality: lint, fix, and format Markdown.
- Extensions: choose or create trusted capabilities.
- Syntax: add authoring syntax.
- Rendering: control document and HTML output.
- Resources: resolve imported, included, and embedded content.
- Security: define input, HTML, and resource boundaries.
- Errors: catch recoverable failures.
- Performance: select and measure the correct processing path.
- Compliance: review supported Markdown specifications.
The core has no runtime Composer dependencies. It supports CommonMark, GitHub Flavored Markdown, and GitHub-oriented documents. Extensions run as trusted application code and receive resource access only through an injected resolver.