appertly/axe-markdown 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

appertly/axe-markdown

Composer 安装命令:

composer require appertly/axe-markdown

包简介

Appertly XHP Extras Markdown: Markdown to XHP

README 文档

README

A ppertly X HP E xtras Markdown: Markdown to XHP in Hack/HHVM.

Packagist Build Status

Installation

You can install this library using Composer:

$ composer require appertly/axe-markdown
  • The master branch (version 0.x) of this project requires HHVM 3.12 and depends on XHP 2.2+ and league/commonmark.

Compliance

Releases of this library will conform to Semantic Versioning.

Our code is intended to comply with PSR-1 and PSR-2. If you find any issues related to standards compliance, please send a pull request!

Features

Instead of using league/commonmark to actually render the HTML, we use it to parse Markdown into an Abstract Syntax Tree, then we create real bona fide XHP nodes from that AST.

Example

function getXhp(): XHPRoot
{
    $str = <<<EOD
# Hello!
This is great
* Don't you think?
EOD;
    return <axe:markdown text={$str}/>;
}

Calling this function will produce XHP nodes exactly like this:

<h1>Hello!</h1><p>This is great</p><ul><li>Don't you think?</li></ul>

You can also supply your own DocParser in case you've registered custom extensions.

$environment = League\CommonMark\Environment::createCommonMarkEnvironment();
// customize Environment
$docParser = new League\CommonMark\DocParser($environment);
// customize DocParser
echo <axe:markdown text={$text} docParser={$docParser}/>;

统计信息

  • 总下载量: 99
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Hack

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固