From 1323f18af45ea0d3aaef5cd9ead0efb5de8b9729 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 19 Apr 2015 14:44:38 -0400 Subject: c<-d: sync, roll develop into current dir branch (5==6) * two dir branches, same library contents (v5 synced & updated with v6) --- lib/sisu/current/html_tune.rb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'lib/sisu/current/html_tune.rb') 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" if (@md.fns =~/\.sst0/) #remove @tuned_file -- cgit v1.2.3