aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/current/html_tune.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-04-19 14:44:38 -0400
committerRalph Amissah <ralph@amissah.com>2015-05-01 18:49:40 -0400
commit1323f18af45ea0d3aaef5cd9ead0efb5de8b9729 (patch)
treee1abd6d04547c269666f276d8bdb24afa9d7dfee /lib/sisu/current/html_tune.rb
parentsetup.rb s/Config/RbConfig/ (diff)
c<-d: sync, roll develop into current dir branch (5==6)
* two dir branches, same library contents (v5 synced & updated with v6)
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