diff --git a/tests/Markdown/MarkdownTest.php b/tests/Markdown/MarkdownTest.php index b7304d26b95..3ae1bd2a7fb 100644 --- a/tests/Markdown/MarkdownTest.php +++ b/tests/Markdown/MarkdownTest.php @@ -249,11 +249,12 @@ public function it_uses_heading_permalinks_on_demand()

Charlie Delta

EOT, $markdown); + // Make assertion without the tabindex attribute because it's only added in commonmark 2.9.2 and later. $this->assertEquals(<<<'EOT'

Alfa Bravo

Charlie Delta

EOT, - rtrim(Markdown::withHeadingPermalinks()->parse($markdown)) + str_replace(' tabindex="-1"', '', rtrim(Markdown::withHeadingPermalinks()->parse($markdown))) ); } @@ -289,10 +290,11 @@ public function it_uses_table_of_contents_on_demand()

Baz qux.

EOT; - // Make assertion without newlines because they differ between versions of commonmark. + // Make assertion without newlines because they differ between versions of commonmark, + // and without the tabindex attribute because it's only added in 2.9.2 and later. $this->assertEquals( str($expected)->replace("\n", ''), - str(Markdown::withTableOfContents()->parse($markdown))->trim()->replace("\n", '') + str(Markdown::withTableOfContents()->parse($markdown))->trim()->replace("\n", '')->replace(' tabindex="-1"', '') ); } }