diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v3/concordance.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v3/dal_syntax.rb | 12 | ||||
-rw-r--r-- | lib/sisu/v3/param.rb | 20 | ||||
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 12 |
4 files changed, 26 insertions, 24 deletions
diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb index 683b092e..1ef42ade 100644 --- a/lib/sisu/v3/concordance.rb +++ b/lib/sisu/v3/concordance.rb @@ -79,10 +79,10 @@ module SiSU_Concordance unless @md.opt.cmd =~/q/ tool=(@md.opt.cmd =~/[MVv]/) \ ? "#{@env.program.web_browser} #{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}" - : "[#{@opt.f_pth[:lng_is]}]" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" @md.opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@md.opt.cmd,"Concordance",tool).grey_title_hi - : SiSU_Screen::Ansi.new(@md.opt.cmd,'Concordance',tool).green_title_hi + ? SiSU_Screen::Ansi.new(@opt.cmd,"Concordance",tool).grey_title_hi + : SiSU_Screen::Ansi.new(@opt.cmd,'Concordance',tool).green_title_hi end wordmax=@env.concord_max unless @md.wc_words.nil? diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb index a412ef3d..3a943b75 100644 --- a/lib/sisu/v3/dal_syntax.rb +++ b/lib/sisu/v3/dal_syntax.rb @@ -97,11 +97,11 @@ module SiSU_Syntax ital_line=%{^/_\s.+?(?:#{Mx[:br_line]}|\n|$)} @line_scan_ital=if defined? @md.make.italics[:str] \ and defined? @vz.markup_make_italic[:str] - /#{@http_m}|#{bold_line}|#{@manmkp_ital}#{tail_m_ital}|(?:#{@md.make.italics[:str]}|#{@vz.markup_make_italic[:str]})#{tail_m_ital}|\S+|\n/ + /#{@http_m}|#{bold_line}|#{@manmkp_ital}#{tail_m_ital}|(?:#{@md.make.italics[:str]}|#{@vz.markup_make_italic[:str]})#{tail_m_ital}|\S+|\n/i elsif defined? @md.make.italics[:str] - /#{@http_m}|#{bold_line}|#{@manmkp_ital}#{tail_m_ital}|#{@md.make.italics[:str]}#{tail_m_ital}|\S+|\n/ + /#{@http_m}|#{bold_line}|#{@manmkp_ital}#{tail_m_ital}|#{@md.make.italics[:str]}#{tail_m_ital}|\S+|\n/i elsif defined? @vz.markup_make_italic[:str] - /#{@http_m}|#{bold_line}|#{@manmkp_ital}#{tail_m_ital}|#{@vz.markup_make_italic[:str]}#{tail_m_ital}|\S+|\n/ + /#{@http_m}|#{bold_line}|#{@manmkp_ital}#{tail_m_ital}|#{@vz.markup_make_italic[:str]}#{tail_m_ital}|\S+|\n/i end @manmkp_bold=emph_italics \ ? '^!_\s.+?(?:\n|$)|[!b]\\{.+?\\}[*!b]|[*!][a-zA-Z0-9\-_]+[!]' @@ -110,13 +110,13 @@ module SiSU_Syntax and @md.make.bold[:str]) \ and (defined? @vz.markup_make_bold[:str] \ and @vz.markup_make_bold[:str]) - /#{@http_m}|#{bold_line}|(?:#{@manmkp_bold}|#{@md.make.bold[:str]}|#{@vz.markup_make_bold[:str]})#{tail_m_bold}|\S+|\n/ + /#{@http_m}|#{bold_line}|(?:#{@manmkp_bold}|#{@md.make.bold[:str]}|#{@vz.markup_make_bold[:str]})#{tail_m_bold}|\S+|\n/i elsif defined? @md.make.bold[:str] \ and @md.make.bold[:str] - /#{@http_m}|#{bold_line}|(?:#{@manmkp_bold}|#{@md.make.bold[:str]})#{tail_m_bold}|\S+|\n/ + /#{@http_m}|#{bold_line}|(?:#{@manmkp_bold}|#{@md.make.bold[:str]})#{tail_m_bold}|\S+|\n/i elsif defined? @vz.markup_make_bold[:str] \ and @vz.markup_make_bold[:str] - /#{@http_m}|#{bold_line}|(?:#{@manmkp_bold}|#{@vz.markup_make_bold[:str]})#{tail_m_bold}|\S+|\n/ + /#{@http_m}|#{bold_line}|(?:#{@manmkp_bold}|#{@vz.markup_make_bold[:str]})#{tail_m_bold}|\S+|\n/i end end def songsheet diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 674b8cba..37ffeea7 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -774,26 +774,26 @@ module SiSU_Param end def bold m=@h['bold'] - x=(m=~/\/i$/)? 'i' : '' + i=(m=~/\/i$/)? 'i' : '' z=if m - m.gsub!(/^\/(.+?)\/i?/,'\1') - m.gsub!(/\(/,'(?:') # avoid need to escape use of brackets within regex provided + x=m.gsub(/^\/(.+?)\/i?/,'\1') + x.gsub!(/\(/,'(?:') # avoid need to escape use of brackets within regex provided rgx='\b(' + m + ')\b' - y=((x =~/i/) ? (/#{rgx}/i) : (/#{rgx}/)) - { str: '\b(?:' + m + ')\b', regx: y } + y=((i =~/i/) ? (/#{rgx}/i) : (/#{rgx}/)) + { str: '\b(?:' + m + ')\b', regx: y, i: i } else nil end z end def italics m=@h['italics'] - x=((m=~/\/i$/) ? 'i' : '') + i=((m=~/\/i$/) ? 'i' : '') z=if m - m.gsub!(/^\/(.+?)\/i?/,'\1') - m.gsub!(/\(/,'(?:') # avoid need to escape use of brackets within regex provided + x=m.gsub(/^\/(.+?)\/i?/,'\1') + x.gsub!(/\(/,'(?:') # avoid need to escape use of brackets within regex provided rgx='\b(' + m + ')\b' - y=((x =~/i/) ? (/#{rgx}/i) : (/#{rgx}/)) - { str: '\b(?:' + m + ')\b', regx: y } + y=((i =~/i/) ? (/#{rgx}/i) : (/#{rgx}/)) + { str: '\b(?:' + m + ')\b', regx: y, i: i } else nil end z diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index b1560c66..cb7b94df 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -4985,15 +4985,17 @@ WOK and ((! @md.nil?) \ && (defined? @md.opt) \ && (defined? @md.opt.mod) \ - && @md.opt.mod.inspect =~/--trust/) - true #security only run skins on sisupod if --trust flag is provided - else false + && @md.opt.mod.inspect !~/--trust/) + true # security only run skins on sisupod if --trust flag is provided + elsif @pwd_stub =~/^(?:doc|sisupod)$/ # consider/reconsider doc + false + else true end doc_skin,dir_skin=nil,nil if skin unless @d_sk.nil? sk_doc="doc/#{@d_sk}.rb" - skin_path.each do |v| #document skin priority 1 + skin_path.each do |v| # document skin priority 1 if FileTest.file?("#{v}/#{sk_doc}") doc_skin="#{v}/#{sk_doc}" load doc_skin @@ -5003,7 +5005,7 @@ WOK end unless doc_skin sk_dir="dir/skin_#{@pwd_stub}.rb" - skin_path.each do |v| #directory skin priority 2 + skin_path.each do |v| # directory skin priority 2 if FileTest.file?("#{v}/#{sk_dir}") dir_skin="#{v}/#{sk_dir}" load dir_skin |