2017 © Pedro Peláez
 

symfony-bundle parsedown-bundle

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

image

colibo/parsedown-bundle

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

  • Wednesday, March 23, 2016
  • by kfi
  • Repository
  • 1 Watchers
  • 1 Stars
  • 64 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Colibo Parsedown Bundle

Add support for parsedown and parsedown-extra in Symfony 3., (*1)

Provides :, (*2)

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

Install

Add the bundle in your composer.json :, (*3)

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

Update your vendors, then enable bundle in AppKernel.php :, (*4)

new Colibo\ParsedownBundle\ColiboParsedownBundle(),

Usage

In twig templates:, (*5)

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

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

In PHP :, (*6)

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

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

The Versions

23/03 2016

dev-master

9999999-dev https://github.com/colibo/ParsedownBundle

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

  Sources   Download

MIT

The Requires

 

twig symfony2 bundle symfony3 markdown parsedown