From 2386d74a25bcbeff7e3022001ed7d14dc0538792 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 6 Oct 2007 13:27:01 +0100 Subject: dal, fix shortcult for listing available generated output (without source); html, keep ocn id where no visible ocn --- lib/sisu/v0/dal.rb | 2 +- lib/sisu/v0/html_format.rb | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb index 0af589f2..15d1c55c 100644 --- a/lib/sisu/v0/dal.rb +++ b/lib/sisu/v0/dal.rb @@ -376,7 +376,7 @@ module SiSU_DAL para.gsub!(/^@(\S+?):([+-])\s+/,'0~\1\2 ') end if para !~/^%+\s/ and - para =~/^(?:_\*\s+)?\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]+))\]\}(?:\.\.\/\S+?\/|\S+?\.(?:sst|ssm)\b)(?:\s+~\{.+?\}~)?(?:\s+\*~\S+)*\s*$/ + para =~/^(?:_\*\s+)?\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]*))\]\}(?:\.\.\/\S+?\/|\S+?\.(?:sst|ssm)\b)(?:\s+~\{.+?\}~)?(?:\s+\*~\S+)*\s*$/ txt,cmd,source,url_dir,note,manifest=nil,nil,nil,nil,nil,nil url_and_stub=SiSU_Env::Info_env.new.url if defined? url_and_stub.remote diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 5a28c271..e1109a6a 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -63,16 +63,21 @@ module SiSU_HTML_Format @md=md @paranum=paranum[/(\d+)/m,1] @paranum ||='' - @paranum='' if @md.mod.inspect =~/--no-ocn/ end def ocn_display - ocn_class=if @md.mod.inspect =~/--no-ocn/; 'ocn_off' - else 'ocn' - end - @paranum.gsub(/^(\d+|)$/, + if @md.markup.inspect =~/no_ocn/ or @md.mod.inspect =~/--no-ocn/ + ocn_class='ocn_off' + @paranum.gsub(/^(\d+|)$/, + %{

+   +

}) + else + ocn_class='ocn' + @paranum.gsub(/^(\d+|)$/, %{

  \\1

}) + end end def name %{} -- cgit v1.2.3