From d716a9639c463f379a5085aad6ce2ec7a4bf95e2 Mon Sep 17 00:00:00 2001 From: Jason Ng <116290832+jason490@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:22:05 -0500 Subject: [PATCH] changed from convertToHtml convert --- src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php | 2 +- .../Submitty/Twig/TokenParser/MarkdownTokenParserTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php b/src/Submitty/Twig/Extension/PHPLeagueMarkdownEngine.php index 24e17b4..e7a179e 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->convertToHtml($content); + return $this->converter->convert($content); } /** diff --git a/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php b/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php index eeadc2a..3c60560 100644 --- a/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php +++ b/tests/Submitty/Twig/TokenParser/MarkdownTokenParserTest.php @@ -32,8 +32,8 @@ public function testConstructor() */ public function testMarkdownPrepareBehavior() { - $body = " # Title\n\n paragraph\n\n code"; - $bodyPrepared = "# Title\n\nparagraph\n\n code"; + $body = " #Title\n\n paragraph\n\n code"; + $bodyPrepared = "#Title\n\nparagraph\n\n code"; ob_start(); echo $body; @@ -70,7 +70,7 @@ public function getTests() { $tests = array(); - $body = new Node(array(new TextNode("# Title\n\nparagraph\n", 1))); + $body = new Node(array(new TextNode("#Title\n\nparagraph\n", 1))); $node = new MarkdownNode($body, 1); $tests['simple text'] = array($node, <<