aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/plaintext.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/plaintext.rb')
-rw-r--r--lib/sisu/v5/plaintext.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/sisu/v5/plaintext.rb b/lib/sisu/v5/plaintext.rb
index 9980b170..f5701b68 100644
--- a/lib/sisu/v5/plaintext.rb
+++ b/lib/sisu/v5/plaintext.rb
@@ -70,7 +70,6 @@ module SiSU_Plaintext
require_relative 'shared_txt' # shared_txt.rb
include SiSU_Param
include SiSU_Viz
- pwd=Dir.pwd
@@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
@@tablefoot=''
class Source
@@ -85,7 +84,6 @@ module SiSU_Plaintext
md=SiSU_Param::Parameters.new(@opt).get
env=SiSU_Env::InfoEnv.new(@opt.fns)
unless @opt.cmd =~/q/
- path=env.path.output_tell
tool=(@opt.cmd =~/[MVv]/) \
? "#{env.program.text_editor} #{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}"
: "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
@@ -189,7 +187,6 @@ WOK
def plaintext_tail
# env=SiSU_Env::InfoEnv.new(@md.fns)
vz=SiSU_Viz::Defaults.new
- base_url="#{@env.url.root}/#{@md.fnb}"
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}"
@@ -268,14 +265,13 @@ WOK
@@endnotes[:para]=[]
end
def markup(data) # Used for major markup instructions
- dir=SiSU_Env::InfoEnv.new(@md.fns)
+ SiSU_Env::InfoEnv.new(@md.fns)
@data_mod,@endnotes,@level,@cont,@copen,@plaintext_contents_close=Array.new(6){[]}
(0..6).each { |x| @cont[x]=@level[x]=false }
(4..6).each { |x| @plaintext_contents_close[x]='' }
plaintext_tail #($1,$2)
plaintext_metadata
table_message='[table omitted, see other document formats]'
- fix=[]
data.each do |dob|
dob.obj=dob.obj.gsub(/#{Mx[:gr_o]}Th?#{Mx[:tc_p]}.+/um,"#{@br}#{table_message}"). #fix
gsub(/.+?#{Mx[:gl_o]}-##{Mx[:gl_c]}/,''). # remove dummy headings (used by html) #check also [~-]#
@@ -337,7 +333,6 @@ WOK
gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]').
gsub(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]')
- wordlist=dob.obj.scan(/\S+/)
if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/
#if defined? dob.ocn and dob.ocn.to_s =~/\d+/
# paranum=dob.ocn.to_s