markforge/markforge
最新稳定版本:v0.2.0
Composer 安装命令:
composer require markforge/markforge
包简介
MarkForge — Markdown to HTML parser for PHP 8.3+ (AST-based, extensible).
关键字:
README 文档
README
MarkForge is an open-source Markdown to HTML parser for PHP 8.3+.
This repository currently contains a minimal, working pipeline (Tokenizer → Parser → AST → Renderer) with incremental feature development.
Requirements
- PHP 8.3+
- Composer
Installation
composer require markforge/markforge
Changelog
See CHANGELOG.md.
Usage
<?php require __DIR__ . '/../vendor/autoload.php'; $parser = new MarkForge\MarkForge(); $html = $parser->parse("Hello, world!\n\nSecond paragraph."); echo $html;
See also: examples/basic.php.
Supported Markdown (current)
- headings
- bold
- italic
- links
- inline code
- horizontal rule
- blockquote
- lists (nested, multiline items, tight/loose)
- fenced code blocks
- tables
- images
- strikethrough
- paragraphs
- text
Running tests
composer install
composer test
Release / Packagist
- Publish the repository on GitHub (source: https://github.com/Smiley-Alyx/markforge).
- Create a semver tag (e.g.
v0.1.0). - Submit the repository to Packagist so
composer require markforge/markforgeworks without VCS configuration.
Project structure
src/
AST/
Exceptions/
Nodes/
Parser/
Renderer/
Tokenizer/
tests/
Security
This project is a Markdown renderer. If you render untrusted user input, you must review the HTML output security implications carefully.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-15