aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/txt_asciidoc.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-10-12 10:56:59 -0400
committerRalph Amissah <ralph@amissah.com>2014-10-12 10:56:59 -0400
commit2e4c214d4d2323864985ccfe93346a9796edee2f (patch)
treebd450b52b31b81fc46150ebee9d4e06bc7e1e560 /lib/sisu/v6/txt_asciidoc.rb
parentdebian/changelog (5.6.9-1) (diff)
parentv5: merge v6: remove defaults.rb & some relics related to sisu skins (diff)
Merge tag 'sisu_5.7.0' into debian/sid
SiSU 5.7.0
Diffstat (limited to 'lib/sisu/v6/txt_asciidoc.rb')
-rw-r--r--lib/sisu/v6/txt_asciidoc.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/sisu/v6/txt_asciidoc.rb b/lib/sisu/v6/txt_asciidoc.rb
index ed1f2826..5f27a86a 100644
--- a/lib/sisu/v6/txt_asciidoc.rb
+++ b/lib/sisu/v6/txt_asciidoc.rb
@@ -62,9 +62,9 @@ module SiSU_Txt_AsciiDoc
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_AsciiDoc
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
@@ -166,7 +164,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}"
@@ -188,7 +185,7 @@ at:
* #{generator}
* #{rubyv}
* #{lastdone}
-* SiSU #{vz.url_sisu}
+* SiSU #{the_url.sisu_txt}
WOK
end
def decorate
@@ -445,7 +442,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}")
dob.obj=dob.obj.gsub(/\s*#{Mx[:en_a_o]}([\d*+]+)\s+(.+?)#{Mx[:en_a_c]}/,' footnote:[note\1,\2]').
gsub(/\s*#{Mx[:en_b_o]}([\d*+]+\s+.+?)#{Mx[:en_b_c]}/,' footnote:[\1]')
dob.obj=dob.obj.gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'[^\1]'). # endnote marker marked up