summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorcl0ne <cl0ne@mithril.org.ua>2018-07-21 20:32:39 +0300
committerFrédéric Guillot <fred@miniflux.net>2018-07-25 15:07:34 -0700
commitc44880a5889ebaaec61001dddd6ba4e0b322d623 (patch)
tree7e01ff2be85536eafb87a683733f9ca7f71440f7 /tests/units
parent88228c3510a604b2f9682c06642987d1cd1dba11 (diff)
Exclude task links and user mentions from nesting
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Helper/TextHelperTest.php14
1 files changed, 14 insertions, 0 deletions
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(
+ '<p><a href="http://localhost">item #123 is here</a></p>',
+ $textHelper->markdown(
+ '[item #123 is here](http://localhost)'
+ )
+ );
}
public function testMarkdownUserLink()
@@ -100,6 +107,13 @@ class TextHelperTest extends Base
);
$this->assertEquals('<p>Text @admin @notfound</p>', $textHelper->markdown('Text @admin @notfound', true));
+
+ $this->assertEquals(
+ '<p><a href="http://localhost">mention @admin at localhost</a></p>',
+ $textHelper->markdown(
+ '[mention @admin at localhost](http://localhost)'
+ )
+ );
}
public function testFormatBytes()