Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Jan 6, 2025
1 parent a600ab1 commit 5bf9f60
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/Markdown/MarkdownTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public function it_uses_table_of_contents_on_demand()
<p>Baz qux.</p>
EOT, $markdown);

$this->assertEquals(<<<'EOT'
$expected = <<<'EOT'
<ul class="table-of-contents">
<li>
<a href="#content-alfa-bravo">Alfa Bravo</a>
Expand All @@ -287,8 +287,12 @@ public function it_uses_table_of_contents_on_demand()
<p>Foo bar.</p>
<h2><a id="content-charlie-delta" href="#content-charlie-delta" class="heading-permalink" aria-hidden="true" title="Permalink">¶</a>Charlie Delta</h2>
<p>Baz qux.</p>
EOT,
rtrim(Markdown::withTableOfContents()->parse($markdown))
EOT;

// Make assertion without newlines because they differ between versions of commonmark.
$this->assertEquals(
str($expected)->replace("\n", ''),
str(Markdown::withTableOfContents()->parse($markdown))->trim()->replace("\n", '')
);
}
}

0 comments on commit 5bf9f60

Please sign in to comment.