minetro/uniparser

This package is abandoned and no longer maintained. No replacement package was suggested.

Universal text parser (Texy, Markdown, Parsedown) for Nette & Nette/Latte

1.0.0 2015-05-05 11:18 UTC

This package is not auto-updated.

Last update: 2019-02-20 18:32:34 UTC


README

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])