aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/manpage_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/manpage_format.rb')
-rw-r--r--lib/sisu/v0/manpage_format.rb25
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