Merged pull request #10 from GromNaN/master.

Don't load MarkdownExtraParser.php if the class MarkdownExtraParser already exists.
This commit is contained in:
Thibault Duplessis 2011-04-25 08:59:01 -07:00
commit d5e735d22c
2 changed files with 4 additions and 2 deletions

View file

@ -2,7 +2,9 @@
namespace Knplabs\Bundle\MarkdownBundle\Parser;
require_once(realpath(__DIR__.'/..').'/vendor/parser/MarkdownExtraParser.php');
if(!class_exists('\MarkdownExtraParser')) {
require_once(realpath(__DIR__.'/..').'/vendor/parser/MarkdownExtraParser.php');
}
/**
* MarkdownParser

View file

@ -24,7 +24,7 @@ You can also define your own Parser class :
## USAGE
// Use the service
$html = $this->container['markdownParser']->transform($text);
$html = $this->container->get('markdownParser')->transform($text);
// Use the helper
echo $view['markdown']->transform($text);