diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-09-16 00:36:14 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-09-16 00:36:14 -0400 |
commit | bc9228c42269bfb4d451ca2d2d92a6a12afb094f (patch) | |
tree | 42b666a81ef350d0ff6153a49d159b3a1c348959 /lib/sisu/v0/manpage_format.rb | |
parent | Updated sisu-0.68.0 (diff) | |
parent | fixes: alphabet list (concordance, dal_idx), and file types (dal_expand_inser... (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/manpage_format.rb')
-rw-r--r-- | lib/sisu/v0/manpage_format.rb | 25 |
1 files changed, 17 insertions, 8 deletions
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 - "<endnote>#@one</endnote> " + "<endnote>#{@txt}</endnote> " end def heading_body1 end |