aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/txt_rst.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-10-12 10:52:35 -0400
committerRalph Amissah <ralph@amissah.com>2014-10-12 10:52:35 -0400
commit32fd8f3908bc8632e2d8ab4d872f6e4362fe031b (patch)
tree8094371a7fd511409992200f4b7c1cb4c33582d6 /lib/sisu/v5/txt_rst.rb
parentv6: '*_parts', remove defaults.rb & some relics related to sisu skins, long gone (diff)
v5: merge v6: remove defaults.rb & some relics related to sisu skinssisu_5.7.0
Diffstat (limited to 'lib/sisu/v5/txt_rst.rb')
-rw-r--r--lib/sisu/v5/txt_rst.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/sisu/v5/txt_rst.rb b/lib/sisu/v5/txt_rst.rb
index 1426f4b3..297a2457 100644
--- a/lib/sisu/v5/txt_rst.rb
+++ b/lib/sisu/v5/txt_rst.rb
@@ -62,9 +62,9 @@ module SiSU_Txt_rST
require_relative 'se' # se.rb
include SiSU_Env
require_relative 'shared_metadata' # shared_metadata.rb
+ require_relative 'generic_parts' # generic_parts.rb
require_relative 'txt_shared' # txt_shared.rb
include SiSU_Param
- include SiSU_Viz
@@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
@@tablefoot=''
class Source
@@ -126,14 +126,12 @@ module SiSU_Txt_rST
end
private
class Scroll <Source
- require_relative 'defaults' # defaults.rb
- require_relative 'txt_shared' # txt_shared.rb
- include SiSU_TextUtils
+ include SiSU_Parts_Generic
+ include SiSU_TextUtils
@@endnotes={ para: [], end: [] }
def initialize(md,data,wrap_width)
@md,@data,@wrap_width=md,data,wrap_width
@env=SiSU_Env::InfoEnv.new(@md.fns)
- @brace_url=SiSU_Viz::Defaults.new.url_decoration
@tab="\t"
@@endnotes_=case md.opt.selections.str
when /--footnote/ then false
@@ -202,7 +200,6 @@ WOK
end
def plaintext_tail
# env=SiSU_Env::InfoEnv.new(@md.fns)
- vz=SiSU_Viz::Defaults.new
generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
@@ -224,7 +221,7 @@ at:
* #{generator}
* #{rubyv}
* #{lastdone}
-* SiSU #{vz.url_sisu}
+* SiSU #{the_url.sisu_txt}
WOK
end
def decorate
@@ -442,7 +439,7 @@ WOK
gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1 [link: <\2>]').
gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}image/,'\1 [link: local image]').
- gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,"#{@brace_url.txt_open}\\1#{@brace_url.txt_close}")
+ gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,"#{the_text.url_open}\\1#{the_text.url_close}")
extract_endnotes(dob)
dob.obj=dob.obj.gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'[^\1]'). # endnote marker marked up
gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,'[^\1]'). # endnote marker marked up