summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-07-06 07:35:10 +0000
committerGo MAEDA <maeda@farend.jp>2024-07-06 07:35:10 +0000
commitf14331458489830a3fb9b1eac8be64ea1f8a1b91 (patch)
tree5004254cef88c45f667802d1809efe89b59ecdf9 /lib/redmine/wiki_formatting
parent2b786a6f48e519b4f09e7804fc06fb531d01b9db (diff)
downloadredmine-f14331458489830a3fb9b1eac8be64ea1f8a1b91.tar.gz
redmine-f14331458489830a3fb9b1eac8be64ea1f8a1b91.zip
Fix RuboCop offense Style/RedundantRegexpEscape in lib/redmine/wiki_formatting/section_helper.rb (#40716).
git-svn-id: https://svn.redmine.org/redmine/trunk@22905 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r--lib/redmine/wiki_formatting/section_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/section_helper.rb b/lib/redmine/wiki_formatting/section_helper.rb
index 6f53a3f8e..bc8b1a9bc 100644
--- a/lib/redmine/wiki_formatting/section_helper.rb
+++ b/lib/redmine/wiki_formatting/section_helper.rb
@@ -42,7 +42,7 @@ module Redmine
i = 0
l = 1
inside_pre = false
- @text.split(/(^(?:\S+\r?\n\r?(?:\=+|\-+)|#+.+|(?:~~~|```).*)\s*$)/).each do |part|
+ @text.split(/(^(?:\S+\r?\n\r?(?:=+|-+)|#+.+|(?:~~~|```).*)\s*$)/).each do |part|
level = nil
if part =~ /\A(~{3,}|`{3,})(\s*\S+)?\s*$/
if !inside_pre
@@ -54,7 +54,7 @@ module Redmine
# nop
elsif part =~ /\A(#+).+/
level = $1.size
- elsif part =~ /\A.+\r?\n\r?(\=+|\-+)\s*$/
+ elsif part =~ /\A.+\r?\n\r?(=+|-+)\s*$/
level = $1.include?('=') ? 1 : 2
end
if level