diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-02-06 21:23:51 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-02-07 15:54:40 +0100 |
commit | e6ce2885c0b4586a270e0ace79598a92365df56f (patch) | |
tree | 6bb17f31c8334c34f573993c1d0e1291cc670849 /tests/unit/includes/MarkdownTest.php | |
parent | ec19ee9d82a9d06e5b86fcb58329767226b0676f (diff) | |
download | volse-hubzilla-e6ce2885c0b4586a270e0ace79598a92365df56f.tar.gz volse-hubzilla-e6ce2885c0b4586a270e0ace79598a92365df56f.tar.bz2 volse-hubzilla-e6ce2885c0b4586a270e0ace79598a92365df56f.zip |
Fix: Keep indentation in html and md code blocks.
Moves the logic for unwrapping broken lines in html (and Markdown) to
the node processing, instead of doing it over the full html content.
This allows us to skip if for code blocks (aka `<code>` elements within
`<pre>` elements).
Diffstat (limited to 'tests/unit/includes/MarkdownTest.php')
-rw-r--r-- | tests/unit/includes/MarkdownTest.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/includes/MarkdownTest.php b/tests/unit/includes/MarkdownTest.php index 8025e8efa..c51fbfe16 100644 --- a/tests/unit/includes/MarkdownTest.php +++ b/tests/unit/includes/MarkdownTest.php @@ -77,6 +77,10 @@ class MarkdownTest extends UnitTestCase { "[code]some code\nover multiple lines[/code]", "```\nsome code\nover multiple lines\n```" ], + 'code block no language indented' => [ + "[code]some code\n over multiple lines\n with indentation[/code]", + "```\nsome code\n over multiple lines\n with indentation\n```" + ], ]; } |