summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-06-29 01:37:24 +0000
committerGo MAEDA <maeda@farend.jp>2023-06-29 01:37:24 +0000
commit0befc3a23cf37565878629af13f704fc5730d9fb (patch)
tree604bb6ec168d2f09fe823518dd1f30a5817a6abf /lib/redmine/wiki_formatting
parente0e751f5bc07c2ad397ebb5b0ab28d802872a602 (diff)
downloadredmine-0befc3a23cf37565878629af13f704fc5730d9fb.tar.gz
redmine-0befc3a23cf37565878629af13f704fc5730d9fb.zip
Fix RuboCop offense Style/RedundantSelfAssignmentBranch (#36919).
git-svn-id: https://svn.redmine.org/redmine/trunk@22263 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r--lib/redmine/wiki_formatting/textile/redcloth3.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index d77a0664b..f0595f438 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -498,7 +498,7 @@ class RedCloth3 < String
c.starts_with?('wiki-class-') ? c : "wiki-class-#{c}"
end.join(' ') if cls
- id = id.starts_with?('wiki-id-') ? id : "wiki-id-#{id}" if id
+ id = "wiki-id-#{id}" if id && !id.start_with?('wiki-id-')
atts = +''
atts << " style=\"#{style.join}\"" unless style.empty?