Home  >  Article  >  Backend Development  >  PHP Markdown 解析器:PHP CommonMark

PHP Markdown 解析器:PHP CommonMark

WBOY
WBOYOriginal
2016-06-20 12:50:251298browse

CommonMark 是基于 CommonMark 规范的 PHP Markdown 解析器。

主要特性:

  • 完全支持 CommonMark 规范 (100% compliance)

  • 匹配 C 和 JavaScript 版本的 CommonMark

  • 持续改进性能

  • 提供扩展解析器和渲染器

基本使用:

use League\CommonMark\CommonMarkConverter;$converter = new CommonMarkConverter();echo $converter->convertToHtml('# Hello World!');// <h1>Hello World!</h1>

项目主页:http://www.open-open.com/lib/view/home/1439898506801

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn