From c44880a5889ebaaec61001dddd6ba4e0b322d623 Mon Sep 17 00:00:00 2001 From: cl0ne Date: Sat, 21 Jul 2018 20:32:39 +0300 Subject: Exclude task links and user mentions from nesting --- tests/units/Helper/TextHelperTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/units/Helper/TextHelperTest.php b/tests/units/Helper/TextHelperTest.php index f8c0f845..9d862900 100644 --- a/tests/units/Helper/TextHelperTest.php +++ b/tests/units/Helper/TextHelperTest.php @@ -50,6 +50,13 @@ class TextHelperTest extends Base 'Check that: http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454' ) ); + + $this->assertEquals( + '

item #123 is here

', + $textHelper->markdown( + '[item #123 is here](http://localhost)' + ) + ); } public function testMarkdownUserLink() @@ -100,6 +107,13 @@ class TextHelperTest extends Base ); $this->assertEquals('

Text @admin @notfound

', $textHelper->markdown('Text @admin @notfound', true)); + + $this->assertEquals( + '

mention @admin at localhost

', + $textHelper->markdown( + '[mention @admin at localhost](http://localhost)' + ) + ); } public function testFormatBytes() -- cgit v1.2.3