diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 16:40:08 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 16:40:08 +0000 |
commit | 18442d568ad8b4758ea78d65383d49c086dad240 (patch) | |
tree | bd3e32e9cd6d71f47fa8278e533e2bfa9076d4c3 | |
parent | 8bac080b8cc3aae63110b895677fa63e42dadc97 (diff) | |
download | redmine-18442d568ad8b4758ea78d65383d49c086dad240.tar.gz redmine-18442d568ad8b4758ea78d65383d49c086dad240.zip |
code layout clean up lib/redmine/wiki_formatting/textile/redcloth3.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18721 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/wiki_formatting/textile/redcloth3.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index b52028205..786db052f 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -831,22 +831,19 @@ class RedCloth3 < String if text.include?('<br />') all else - url, url_title = check_refs( url ) + url, url_title = check_refs(url) title ||= url_title - # Idea below : an URL with unbalanced parethesis and # ending by ')' is put into external parenthesis if url[-1] == ")" and ((url.count("(") - url.count(")")) < 0) - url=url[0..-2] # discard closing parenth from url - post = ")"+post # add closing parenth to post + url = url[0..-2] # discard closing parenth from url + post = ")" + post # add closing parenth to post end - atts = pba( atts ) + atts = pba(atts) atts = +" href=\"#{htmlesc url}#{slash}\"#{atts}" atts << " title=\"#{htmlesc title}\"" if title - atts = shelve( atts ) if atts - + atts = shelve(atts) if atts external = (url =~ /^https?:\/\//) ? ' class="external"' : '' - "#{pre}<a#{atts}#{external}>#{text}</a>#{post}" end end |