bgaze/parsedown-bundle

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

Add support for parsedown and parsedown-extra in Symfony 2 by providing services and Twig filters.

Installs: 2 585

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 3

Open Issues: 0

Type:symfony-bundle

dev-master 2018-05-30 10:05 UTC

This package is auto-updated.

Last update: 2020-01-17 16:21:40 UTC


README

This project is not maintained anymore. Feel free to fork it and upgrade it as you want.

Bgaze Parsedown Bundle

Add support for parsedown and parsedown-extra in Symfony 2.

Provides :

  • Two services:
    • parsedown.standart : parsedown parser.
    • parsedown.extra : parsedown-extra parser (support for Markdown Extra).
  • Two twig filter:
    • md : parse markdown with standart parser.
    • mde : parse markdown with extra parser.

Install

Add the bundle in your composer.json :

"require": {
    "bgaze/parsedown-bundle": "dev-master"
}

Update your vendors, then enable bundle in AppKernel.php :

new Bgaze\ParsedownBundle\BgazeParsedownBundle(),

Usage

In twig templates:

{# Parse markdown using parsedown standart parser #}
{{ var|md }}

{# Parse markdown using parsedown-extra parser #}
{{ var|mde }}

In PHP :

// Parse markdown using parsedown standart parser.
echo $container->get('parsedown.standart')->text($var);

// Parse markdown using parsedown-extra parser.
echo $container->get('parsedown.extra')->text($var);