diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
commit | 7d4665f60be31a0481416cfc152bac4442cc6e74 (patch) | |
tree | 295a7c81ace0792ab5a32427cdbb9c6b8e1a6184 /lib/sisu/v3/html.rb | |
parent | v3: vim, ftplugin/sisu.vim (diff) |
v3: cosmetic code, true ? x : y
Diffstat (limited to 'lib/sisu/v3/html.rb')
-rw-r--r-- | lib/sisu/v3/html.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 100916ff..3a2f8a0d 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -90,9 +90,9 @@ module SiSU_HTML @env=@particulars.env loc=@env.url.output_tell unless @opt.cmd =~/q/ - tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}" - else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" - end + tool=(@opt.cmd =~/[MVvz]/) \ + ? ("#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}") + : ("[#{@opt.f_pth[:lng_is]}] #{@opt.fno}") @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi @@ -167,9 +167,9 @@ module SiSU_HTML and @md.lnk @md.lnk.each do |l| if defined? l[:say] - target=if l[:url] !~/^\.(\.)?\//; 'external' - else '_top' - end + target=(l[:url] !~/^\.(\.)?\//) \ + ? 'external' + : '_top' s_lnk_url,s_lnk_lnk=l[:url],l[:say] txt_obj={ lnk_url: s_lnk_url, lnk_txt: s_lnk_lnk, target: target } lev_dob_ocn=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) @@ -350,9 +350,9 @@ WOK end else @@toc[:scr] << '<br />' - link=if dob.ln; dob.ln - else '' - end + link=(dob.ln) \ + ? dob.ln + : '' %{<b><a href="##{link}">#{linkname}</a></b>} end txt_obj={ txt: title } |