aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/includes/BBCodeTest.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-10-12 18:19:43 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-10-12 18:19:43 +0200
commitecde4a3dede85bfa0fa32a91c51c335716c68c4c (patch)
tree843a45cb8c1106b64b34035385cb13ae6e206c7e /tests/unit/includes/BBCodeTest.php
parent687cda367316edb9f84b3e425e76c9e9279e96be (diff)
downloadvolse-hubzilla-ecde4a3dede85bfa0fa32a91c51c335716c68c4c.tar.gz
volse-hubzilla-ecde4a3dede85bfa0fa32a91c51c335716c68c4c.tar.bz2
volse-hubzilla-ecde4a3dede85bfa0fa32a91c51c335716c68c4c.zip
Change config used by Markdown tests to reflect actual use.
This makes the configuration used align better with how it is being used in the mdpost addon. This also reveals some issues that are less than ideal for Markdown posts. The relevant test cases have been adjusted to pass with the new config, but have been commented.
Diffstat (limited to 'tests/unit/includes/BBCodeTest.php')
-rw-r--r--tests/unit/includes/BBCodeTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/includes/BBCodeTest.php b/tests/unit/includes/BBCodeTest.php
index c6a60f35b..136fc6e0e 100644
--- a/tests/unit/includes/BBCodeTest.php
+++ b/tests/unit/includes/BBCodeTest.php
@@ -143,6 +143,14 @@ class BBCodeTest extends UnitTestCase {
'example url: https://example.com',
'example url: <a href="https://example.com" target="_blank" rel="nofollow noopener">https://example.com</a>'
],
+ 'naked url followed by newline' => [
+ "https://www.example.com\nhave a great day.",
+ '<a href="https://www.example.com" target="_blank" rel="nofollow noopener">https://www.example.com</a><br />have a great day.',
+ ],
+ 'inline naked url' => [
+ "This is a link https://example.com/some/path more info.",
+ 'This is a link <a href="https://example.com/some/path" target="_blank" rel="nofollow noopener">https://example.com/some/path</a> more info.',
+ ],
'naked url within code block is not converted to link' => [
"[code]\nhttp://example.com\n[/code]",
"<pre><code>http://example.com</code></pre>"