aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/current/html_tune.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/current/html_tune.rb')
-rw-r--r--lib/sisu/current/html_tune.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/sisu/current/html_tune.rb b/lib/sisu/current/html_tune.rb
index 5a4575cf..c02fc496 100644
--- a/lib/sisu/current/html_tune.rb
+++ b/lib/sisu/current/html_tune.rb
@@ -151,7 +151,6 @@ module SiSU_HTML_Tune
end
def songsheet_array(data)
data_tuned=[]
- #@tuned_file=[]
data.each do |dob|
dob=amp_angle_brackets(dob)
dob=endnotes_html(dob)
@@ -162,9 +161,8 @@ module SiSU_HTML_Tune
data_tuned
end
def urls(data)
- @words=[]
- data.each do |word|
- @words << if word=~/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/
+ @words=data.each.map do |word|
+ if word=~/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/
http_=true
if word =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/
m,u=/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/.match(word).captures
@@ -208,9 +206,7 @@ module SiSU_HTML_Tune
word
else word
end
- word
- end
- @words=@words.join(' ')
+ end.join(' ')
end
def url_markup(dob)
unless dob.is==:code
@@ -293,10 +289,9 @@ module SiSU_HTML_Tune
end
def output
data=@data
- @tuned_file=[]
- data.each do |dob|
+ @tuned_file=data.each.map do |dob|
dob.obj=dob.obj.strip.chomp
- @tuned_file << dob
+ dob
end
@tuned_file << "\n<EOF>" if (@md.fns =~/\.sst0/) #remove
@tuned_file