summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-07-06 07:46:47 +0000
committerGo MAEDA <maeda@farend.jp>2024-07-06 07:46:47 +0000
commitbaf32a3fa4be3de208b20f7304b89d71f3967ee7 (patch)
tree8e69d07ef1dd0fd0472a5a6dc524be99061016c6 /test
parentc0dc6ef4d0f0a6d3e2d20673f9a0eb1d0f3f481c (diff)
downloadredmine-baf32a3fa4be3de208b20f7304b89d71f3967ee7.tar.gz
redmine-baf32a3fa4be3de208b20f7304b89d71f3967ee7.zip
Add test for r22906 (#40716).
git-svn-id: https://svn.redmine.org/redmine/trunk@22907 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
index 03376e342..f7ffb3e97 100644
--- a/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
@@ -207,6 +207,21 @@ class Redmine::WikiFormatting::CommonMark::FormatterTest < ActionView::TestCase
assert_section_with_hash STR_WITH_PRE[2], text, 3
end
+ def test_get_section_should_not_recognize_double_hash_issue_reference_as_heading
+ text = <<~STR
+ ## Section A
+
+ This text is a part of Section A.
+
+ ##1 : This is an issue reference, not an ATX heading.
+
+ This text is also a part of Section A.
+ <!-- Section A ends here -->
+ STR
+
+ assert_section_with_hash text.chomp, text, 1
+ end
+
def test_update_section_should_not_escape_pre_content_outside_section
text = STR_WITH_PRE.join("\n\n")
replacement = "New text"