[DEPRECATED] Universal text parser (Texy, Markdown, Parsedown, ...) for Nette & Latte
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitattributes
.gitignore
.travis.yml
README.md
composer.json

README.md

Uniparser

Universal text parser for Nette & Latte.


Build Status Downloads total Latest stable HHVM Status

Discussion / Help

Join the chat

Install

$ composer require minetro/uniparser:~1.0.0

Dependencies

TexyAdapter

"texy/texy": "~2.6.0"

ParsedownAdapter

"erusev/parsedown-extra": "~0.7.0"

MarkdownAdapter

"michelf/php-markdown": "~1.5.0"

Usage

Standalone

use Minetro\Uniparser\ParserFactory;

$factory = new ParserFactory();

$adapter = $factory->create('parsedown');

echo $adapter->parse($text);

Latte

uniparser.factory: Minetro\Uniparser\ParserFactory

nette.latteFactory:
    setup:
        - addFilter(texy, [@uniparser.factory::create('texy'), parse])
        - addFilter(parsedown, [@uniparser.factory::create('parsedown'), parse])
        - addFilter(markdown, [@uniparser.factory::create('markdown'), parse])