diff --git a/src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php b/src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php index e7a179e..2183425 100644 --- a/src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php +++ b/src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php @@ -40,7 +40,7 @@ public function __construct(MarkdownConverter $converter = null) */ public function transform($content) { - return $this->converter->convert($content); + return $this->converter->convert($content)->getContent(); } /** diff --git a/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php b/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php index 72263b7..449a76e 100644 --- a/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php +++ b/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php @@ -49,9 +49,8 @@ public function testMarkdownPrepareBehavior() // Assert Markdown output $expectedOutput = "

Title

\n\n

paragraph

\n\n
code\n
\n"; $output = $this->getEngine()->transform($content); - echo $output; - // $this->assertIsString($output,$expectedOutput); - // $this->assertEquals($output, $this->getEngine()->transform($content)); + $this->assertIsString($output,$expectedOutput); + $this->assertEquals($output, $this->getEngine()->transform($content)); } /**