summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r--lib/redmine/wiki_formatting/html_parser.rb2
-rw-r--r--lib/redmine/wiki_formatting/macros.rb2
-rw-r--r--lib/redmine/wiki_formatting/markdown/formatter.rb4
-rw-r--r--lib/redmine/wiki_formatting/markdown/helper.rb2
-rw-r--r--lib/redmine/wiki_formatting/markdown/html_parser.rb2
-rw-r--r--lib/redmine/wiki_formatting/textile/formatter.rb8
-rw-r--r--lib/redmine/wiki_formatting/textile/helper.rb2
-rw-r--r--lib/redmine/wiki_formatting/textile/html_parser.rb2
-rw-r--r--lib/redmine/wiki_formatting/textile/redcloth3.rb28
9 files changed, 26 insertions, 26 deletions
diff --git a/lib/redmine/wiki_formatting/html_parser.rb b/lib/redmine/wiki_formatting/html_parser.rb
index d1c90b502..62445ff3b 100644
--- a/lib/redmine/wiki_formatting/html_parser.rb
+++ b/lib/redmine/wiki_formatting/html_parser.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb
index c1e3ee4e5..48c91b6e8 100644
--- a/lib/redmine/wiki_formatting/macros.rb
+++ b/lib/redmine/wiki_formatting/macros.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/markdown/formatter.rb
index f605e94b7..20c18bcaf 100644
--- a/lib/redmine/wiki_formatting/markdown/formatter.rb
+++ b/lib/redmine/wiki_formatting/markdown/formatter.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
@@ -83,7 +83,7 @@ module Redmine
end
def extract_sections(index)
- sections = ['', '', '']
+ sections = [+'', +'', +'']
offset = 0
i = 0
l = 1
diff --git a/lib/redmine/wiki_formatting/markdown/helper.rb b/lib/redmine/wiki_formatting/markdown/helper.rb
index 0a5998cf4..4f79acdd7 100644
--- a/lib/redmine/wiki_formatting/markdown/helper.rb
+++ b/lib/redmine/wiki_formatting/markdown/helper.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
diff --git a/lib/redmine/wiki_formatting/markdown/html_parser.rb b/lib/redmine/wiki_formatting/markdown/html_parser.rb
index 7cf0a1d37..d3900a2bd 100644
--- a/lib/redmine/wiki_formatting/markdown/html_parser.rb
+++ b/lib/redmine/wiki_formatting/markdown/html_parser.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb
index 313595c58..aec94bc6e 100644
--- a/lib/redmine/wiki_formatting/textile/formatter.rb
+++ b/lib/redmine/wiki_formatting/textile/formatter.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
@@ -65,9 +65,9 @@ module Redmine
@pre_list = []
text = self.dup
rip_offtags text, false, false
- before = ''
- s = ''
- after = ''
+ before = +''
+ s = +''
+ after = +''
i = 0
l = 1
started = false
diff --git a/lib/redmine/wiki_formatting/textile/helper.rb b/lib/redmine/wiki_formatting/textile/helper.rb
index b29ade8be..3d8c2d163 100644
--- a/lib/redmine/wiki_formatting/textile/helper.rb
+++ b/lib/redmine/wiki_formatting/textile/helper.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
diff --git a/lib/redmine/wiki_formatting/textile/html_parser.rb b/lib/redmine/wiki_formatting/textile/html_parser.rb
index 467281d87..35215a336 100644
--- a/lib/redmine/wiki_formatting/textile/html_parser.rb
+++ b/lib/redmine/wiki_formatting/textile/html_parser.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index 1cd5e0580..c4dc4c25e 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# vim:ts=4:sw=4:
# = RedCloth - Textile and Markdown Hybrid for Ruby
@@ -467,7 +467,7 @@ class RedCloth3 < String
# Parses Textile attribute lists and builds an HTML attribute string
def pba( text_in, element = "" )
- return '' unless text_in
+ return +'' unless text_in
style = []
text = text_in.dup
@@ -505,7 +505,7 @@ class RedCloth3 < String
id = id.starts_with?('wiki-id-') ? id : "wiki-id-#{id}" if id
- atts = ''
+ atts = +''
atts << " style=\"#{ style.join }\"" unless style.empty?
atts << " class=\"#{ cls }\"" unless cls.to_s.empty?
atts << " lang=\"#{ lang }\"" if lang
@@ -586,9 +586,9 @@ class RedCloth3 < String
depth << tl
atts = pba( atts )
atts = shelve( atts ) if atts
- lines[line_id] = "\t<#{ lT(tl) }l#{ atts }>\n\t<li>#{ content }"
+ lines[line_id] = +"\t<#{ lT(tl) }l#{ atts }>\n\t<li>#{ content }"
else
- lines[line_id] = "\t\t<li>#{ content }"
+ lines[line_id] = +"\t\t<li>#{ content }"
end
last_line = line_id
@@ -611,7 +611,7 @@ class RedCloth3 < String
def block_textile_quotes( text )
text.gsub!( QUOTES_RE ) do |match|
lines = match.split( /\n/ )
- quotes = ''
+ quotes = +''
indent = 0
lines.each do |line|
line =~ QUOTES_CONTENT_RE
@@ -639,7 +639,7 @@ class RedCloth3 < String
text.gsub!( CODE_RE ) do |m|
before,lang,code,after = $~[1..4]
lang = " lang=\"#{ lang }\"" if lang
- rip_offtags( "#{ before }<code#{ lang }>#{ code }</code>#{ after }", false )
+ rip_offtags( +"#{ before }<code#{ lang }>#{ code }</code>#{ after }", false )
end
end
@@ -851,7 +851,7 @@ class RedCloth3 < String
post = ")"+post # add closing parenth to post
end
atts = pba( atts )
- atts = " href=\"#{ htmlesc url }#{ slash }\"#{ atts }"
+ atts = +" href=\"#{ htmlesc url }#{ slash }\"#{ atts }"
atts << " title=\"#{ htmlesc title }\"" if title
atts = shelve( atts ) if atts
@@ -962,7 +962,7 @@ class RedCloth3 < String
stln,algn,atts,url,title,href,href_a1,href_a2 = $~[1..8]
htmlesc title
atts = pba( atts )
- atts = " src=\"#{ htmlesc url.dup }\"#{ atts }"
+ atts = +" src=\"#{ htmlesc url.dup }\"#{ atts }"
atts << " title=\"#{ title }\"" if title
atts << " alt=\"#{ title }\""
# size = @getimagesize($url);
@@ -973,7 +973,7 @@ class RedCloth3 < String
next m unless uri_with_safe_scheme?(url)
- out = ''
+ out = +''
out << "<a#{ shelve( " href=\"#{ href }\"" ) }>" if href
out << "<img#{ shelve( atts ) } />"
out << "</a>#{ href_a1 }#{ href_a2 }" if href
@@ -1096,25 +1096,25 @@ class RedCloth3 < String
if codepre - used_offtags.length > 0
htmlesc( line, :NoQuotes ) if escape_line
@pre_list.last << line
- line = ""
+ line = +""
else
### htmlesc is disabled between CODE tags which will be parsed with highlighter
### Regexp in formatter.rb is : /<code\s+class="(\w+)">\s?(.+)/m
### NB: some changes were made not to use $N variables, because we use "match"
### and it breaks following lines
htmlesc( aftertag, :NoQuotes ) if aftertag && escape_aftertag && !first.match(/<code\s+class="(\w+)">/)
- line = "<redpre##{ @pre_list.length }>"
+ line = +"<redpre##{ @pre_list.length }>"
first.match(/<#{ OFFTAGS }([^>]*)>/)
tag = $1
$2.to_s.match(/(class\=("[^"]+"|'[^']+'))/i)
tag << " #{$1}" if $1 && tag == 'code'
- @pre_list << "<#{ tag }>#{ aftertag }"
+ @pre_list << +"<#{ tag }>#{ aftertag }"
end
elsif $1 and codepre > 0
if codepre - used_offtags.length > 0
htmlesc( line, :NoQuotes ) if escape_line
@pre_list.last << line
- line = ""
+ line = +""
end
codepre -= 1 unless codepre.zero?
used_offtags = {} if codepre.zero?