From 3f691ee4c21107500f7c4a53866a998cc3beb408 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 16 Oct 2019 13:00:41 +0000 Subject: [PATCH] code cleanup: rubocop: fix Layout/LeadingCommentSpace in lib/redmine/wiki_formatting/textile/redcloth3.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18690 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - lib/redmine/wiki_formatting/textile/redcloth3.rb | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d8b156365..32de25025 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -249,7 +249,6 @@ Layout/IndentationWidth: Layout/LeadingCommentSpace: Exclude: - 'lib/diff.rb' - - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index 38f98282a..24aa67267 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -451,10 +451,10 @@ class RedCloth3 < String # Search and replace for Textile glyphs (quotes, dashes, other symbols) def pgl( text ) - #GLYPHS.each do |re, resub, tog| + # GLYPHS.each do |re, resub, tog| # next if tog and method( tog ).call # text.gsub! re, resub - #end + # end text.gsub!(/\b([A-Z][A-Z0-9]{1,})\b(?:[(]([^)]*)[)])/) do |m| "#{$1}" end @@ -826,7 +826,7 @@ class RedCloth3 < String ) (?=<|\s|$) /x -#" + def inline_textile_link( text ) text.gsub!( LINK_RE ) do |m| all,pre,atts,text,title,url,proto,slash,post = $~[1..9]