From f2fac3b689760501e762f1ed4314b24b01559ab0 Mon Sep 17 00:00:00 2001 From: Jason Ng <116290832+jason490@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:40:24 -0500 Subject: [PATCH] changed to get content --- src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php | 2 +- tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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)); } /**