From b51d40fe38f4f508edd03323b1d3dc30bc9931e3 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 17 Mar 2022 03:55:24 +0000 Subject: Comments for Textile text formatting (#20511). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21457 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/helpers/application_helper_test.rb | 1 - .../wiki_formatting/textile_formatter_test.rb | 32 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 20b854cc7..f34daf55a 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1300,7 +1300,6 @@ class ApplicationHelperTest < Redmine::HelperTest "
\nline 1\nline2
" => "
\nline 1\nline2
", "
\nline 1\nline2
" => "
\nline 1\nline2
", "
content
" => "
<div>content</div>
", - "HTML comment: " => "

HTML comment: <!-- no comments -->

", " + Hello world. + + Foo + +
+      This is a code block.
+      

+ +

+
+ STR + expected = <<~EXPECTED +

Hello world.

+ +

Foo

+ +
+      This is a code block.
+      <p>
+      <!-- comments in a code block should be preserved -->
+      </p>
+      
+ + EXPECTED + assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '') + end + private def assert_html_output(to_test, expect_paragraph = true) -- cgit v1.2.3