diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-06-25 00:07:44 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-06-25 00:07:44 -0400 |
commit | c25fc2751886278a4e7f30f127e80449160a47f1 (patch) | |
tree | d19cab06d629a995848a296409693b5890d59f60 /lib/sisu/v4/param_make.rb | |
parent | v5: "general code cleaning" fix (diff) |
v4: general code cleaning, sync with v5sisu_4.1.6
Diffstat (limited to 'lib/sisu/v4/param_make.rb')
-rw-r--r-- | lib/sisu/v4/param_make.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/sisu/v4/param_make.rb b/lib/sisu/v4/param_make.rb index 675c0955..616ef77d 100644 --- a/lib/sisu/v4/param_make.rb +++ b/lib/sisu/v4/param_make.rb @@ -176,7 +176,7 @@ module SiSU_Param_Make { page_new: page_new, page_break: page_break, page_line: page_line } end def language - l=if @h['language'] && (@h['language']=~/\S{2,}/) + if @h['language'] && (@h['language']=~/\S{2,}/) ((@h['language'] =~/,/) \ ? (@h['language'].split(/,\s*/)) : [ @h['language'] ]) @@ -186,7 +186,7 @@ module SiSU_Param_Make def bold m=@h['bold'] i=(m=~/\/i$/)? 'i' : '' - z=if m + if m x=m.gsub(/^\/(.+?)\/i?/,'\1'). gsub(/\((?:\?:)?/,'(?:') # avoid need to escape use of brackets within regex provided rgx='\b(' + x + ')\b' @@ -198,7 +198,7 @@ module SiSU_Param_Make def italics m=@h['italics'] i=((m=~/\/i$/) ? 'i' : '') - z=if m + if m x=m.gsub(/^\/(.+?)\/i?/,'\1'). gsub(/\((?:\?:)?/,'(?:') # avoid need to escape use of brackets within regex provided rgx='\b(' + x + ')\b' @@ -216,7 +216,7 @@ module SiSU_Param_Make end def substitute m=@h['substitute'] - z=if m + if m w=m.scan(/\/(.+?)\/(i?,)\s*'(.+?)'(?:\s+|\s*;\s*|$)/) arr_hash=[] matches='' @@ -430,12 +430,10 @@ module SiSU_Param_Make {w: w, h: h} end def home_button_text - s=if @h['home_button_text'] + if @h['home_button_text'] @h['home_button_text'].split(/\s*;\s*/) else nil end - #l,n=Db[:home_button],'make.home_button_text' - #validate_length(s,l,n) end def home_button_image s=nil @@ -488,7 +486,7 @@ module SiSU_Param_Make end end def footer - s=if @h['footer'] + if @h['footer'] @h['footer'].split(/\s*;\s*/) else nil end |