From 3d5bca08bf3a8b22d91ae54a9a70fd66de344ea6 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 20 Aug 2024 14:50:06 +0800 Subject: [PATCH] MDL-82828 core: Add test for html2text trailing space between tags --- lib/tests/html2text_test.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/tests/html2text_test.php b/lib/tests/html2text_test.php index 15c7a2de9f3..295a0698c5b 100644 --- a/lib/tests/html2text_test.php +++ b/lib/tests/html2text_test.php @@ -156,6 +156,16 @@ final class html2text_test extends \basic_testcase { [], 'Interesting text', ], + 'Trailing spaces before newline or tab' => [ + "Some text with trailing space\n\nAnd some more text\n", + [], + '

Some text with trailing space

And some more text

', + ], + 'Trailing spaces before newline or tab (list)' => [ + "\t* Some text with trailing space\n\t* And some more text\n\n", + [], + '', + ], ]; }