aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/plaintext_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/plaintext_format.rb')
-rw-r--r--lib/sisu/v0/plaintext_format.rb26
1 files changed, 18 insertions, 8 deletions
diff --git a/lib/sisu/v0/plaintext_format.rb b/lib/sisu/v0/plaintext_format.rb
index e957d3a3..ddac2e32 100644
--- a/lib/sisu/v0/plaintext_format.rb
+++ b/lib/sisu/v0/plaintext_format.rb
@@ -78,19 +78,30 @@ 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
+ @lnk_url =t_o[:lnk_url] || nil
+ @lnk_txt =t_o[:lnk_txt] || nil
+ #elsif t_o.class == Array
+ # @txt =txt[0]
+ #elsif t_o.class == String
+ # @txt =txt
+ else
+ #@one,@two,@three=one,two,three
+ p t_o.class
+ p caller
+ end
rgx=/^#{Rx[:lv]}/
- @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
@@ -109,4 +120,3 @@ module Format
end
end
__END__
-