2017 © Pedro PelĂĄez
 

library axe-markdown

Appertly XHP Extras Markdown: Markdown to XHP

image

appertly/axe-markdown

Appertly XHP Extras Markdown: Markdown to XHP

  • Sunday, September 18, 2016
  • by doublecompile
  • Repository
  • 1 Watchers
  • 0 Stars
  • 95 Installations
  • Hack
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

appertly/axe-markdown

A ppertly X HP E xtras Markdown: Markdown to XHP in Hack/HHVM., (*1)

Packagist Build Status, (*2)

Installation

You can install this library using Composer:, (*3)

$ 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., (*4)

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!, (*5)

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., (*6)

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:, (*7)

<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., (*8)

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

The Versions

18/09 2016

dev-master

9999999-dev http://github.com/appertly/axe-markdown

Appertly XHP Extras Markdown: Markdown to XHP

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown hack hhvm xhp

23/05 2016

0.1.0

0.1.0.0 http://github.com/appertly/axe-markdown

Appertly XHP Extras Markdown: Markdown to XHP

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown hack hhvm xhp