From 08c69d074001507d64cd5960c8679ec91a5a8353 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 23 Aug 2008 12:01:59 -0400 Subject: pass Hash to Format classes; some match tuning in dal --- lib/sisu/v0/manpage_format.rb | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v0/manpage_format.rb') diff --git a/lib/sisu/v0/manpage_format.rb b/lib/sisu/v0/manpage_format.rb index 02fbf216..28756455 100644 --- a/lib/sisu/v0/manpage_format.rb +++ b/lib/sisu/v0/manpage_format.rb @@ -58,7 +58,7 @@ ** Description: manpage formatting template =end -module Format +module SiSU_Manpage_format require "#{SiSU_lib}/param" include SiSU_Param include SiSU_Viz @@ -78,19 +78,28 @@ module Format end class Format_text_object @@dp=nil - def initialize(one,two,three) - one.gsub!(/\.(html|pdf|php)/,'') if one =~/\.\.\/\S+/ - @one,@two,@three=one,two,three + def initialize(md,t_o) + @md,@t_o=md,t_o + if @t_o.class == Hash + @txt =@t_o[:txt] || nil + #elsif t_o.class == Array + # @txt =txt[0] + #elsif t_o.class == String + # @txt =txt + else + p t_o.class + p caller + end + #@txt.gsub!(/\.(html|pdf|php)/,'') if one =~/\.\.\/\S+/ rgx=/^#{Mx[:lv_o]}[1-6-]:/ - @one.gsub!(rgx,'') if @one =~rgx + @txt.gsub!(rgx,'') if @txt =~rgx @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:id_o]}#@dp#{Mx[:id_c]}#{Mx[:en_a_c]}/ - @one.gsub!(rgx,'\1') if @one =~rgx - @link,@linkname=one,two + @txt.gsub!(rgx,'\1') if @txt =~rgx @vz=SiSU_Env::Get_init.instance.skin end def scr_endnote_body - "#@one " + "#{@txt} " end def heading_body1 end -- cgit v1.2.3