aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/includes
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-02-07 22:34:13 +0100
committerHarald Eilertsen <haraldei@anduin.net>2024-02-07 22:34:13 +0100
commit86e953f49566a0f4bb2220a8e5f4013044f4a49f (patch)
treecd508fc97a1e5c86783e36c738ed9b36cedae406 /tests/unit/includes
parent4f69e02768ac79f81f1a7ef3e7891d2e0f8f06fe (diff)
downloadvolse-hubzilla-86e953f49566a0f4bb2220a8e5f4013044f4a49f.tar.gz
volse-hubzilla-86e953f49566a0f4bb2220a8e5f4013044f4a49f.tar.bz2
volse-hubzilla-86e953f49566a0f4bb2220a8e5f4013044f4a49f.zip
Fix: Preserve hard linebreaks from markdown and html
Diffstat (limited to 'tests/unit/includes')
-rw-r--r--tests/unit/includes/MarkdownTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/includes/MarkdownTest.php b/tests/unit/includes/MarkdownTest.php
index c51fbfe16..87cfc2899 100644
--- a/tests/unit/includes/MarkdownTest.php
+++ b/tests/unit/includes/MarkdownTest.php
@@ -57,6 +57,10 @@ class MarkdownTest extends UnitTestCase {
'This text is text wrapped over multiple lines.',
"This text is\ntext wrapped\nover multiple\nlines."
],
+ 'text with hard linebreak' => [
+ "Line one\nLine two",
+ "Line one \nLine two"
+ ],
'paragraphs' => [
"Paragraph one\n\nParagraph two",
"Paragraph one\n\nParagraph two",
@@ -73,6 +77,10 @@ class MarkdownTest extends UnitTestCase {
'[code]some code[/code]',
'`some code`'
],
+ 'inline code with wrapped text' => [
+ '[code]some code unwrapped[/code]',
+ "`some code\n unwrapped`"
+ ],
'code block no language' => [
"[code]some code\nover multiple lines[/code]",
"```\nsome code\nover multiple lines\n```"