Skip to content

Commit

Permalink
changed to get content
Browse files Browse the repository at this point in the history
  • Loading branch information
jason490 committed Nov 27, 2023
1 parent b28e039 commit f2fac3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
5 changes: 2 additions & 3 deletions tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ public function testMarkdownPrepareBehavior()
// Assert Markdown output
$expectedOutput = "<h1>Title</h1>\n\n<p>paragraph</p>\n\n<pre><code>code\n</code></pre>\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));
}

/**
Expand Down

0 comments on commit f2fac3b

Please sign in to comment.