diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-10-15 19:27:27 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-10-15 19:27:27 +0100 |
commit | 7330cf6ae4fa17e3f6d9914ead719655ebbe590b (patch) | |
tree | 1f7253a22872ca2501d7aefc2a48b9b2df65f7f4 /lib/sisu/v0/sst_do_inline_footnotes.rb | |
parent | debian/control add depends on rsync (diff) | |
parent | mostly the arrangement of conditionals (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/sst_do_inline_footnotes.rb')
-rw-r--r-- | lib/sisu/v0/sst_do_inline_footnotes.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/sisu/v0/sst_do_inline_footnotes.rb b/lib/sisu/v0/sst_do_inline_footnotes.rb index 0bbaa131..fba5b177 100644 --- a/lib/sisu/v0/sst_do_inline_footnotes.rb +++ b/lib/sisu/v0/sst_do_inline_footnotes.rb @@ -125,7 +125,8 @@ module SiSU_Convert_footnotes meta=file_array.dup meta=meta.join.split("\n\n") #check whether can be eliminated, some of these are large objects to have twice @md=SiSU_Param::Parameters::Instructions.new(meta,@opt).extract - if @md.en[:mismatch] == 0 or @md.mod.inspect =~/=footnotes-force/ + if @md.en[:mismatch] == 0 \ + or @md.mod.inspect =~/=footnotes-force/ meta=nil dal=SiSU_Convert_footnotes::Make.new(@md,file_array).song SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.fns}.fn").output if @md.cmd =~/v/ @@ -208,7 +209,8 @@ module SiSU_Convert_footnotes data=@data tuned_file,vocab_insert=[],[] data.each do |para| - if para =~/^1~/ and @@flag_vocab == 0 + if para =~/^1~/ \ + and @@flag_vocab == 0 vocab_insert << '@vocabulary: lex' << "\n\n" << para tuned_file << vocab_insert unless para.nil? @@flag_vocab=1 @@ -273,7 +275,8 @@ module SiSU_Convert_footnotes para.gsub!(/^8~/,'5~') para.gsub!(/^9~/,'6~') end - if para =~/<:insert\d+!?>/ and para !~/^%\s+/ + if para =~/<:insert\d+!?>/ \ + and para !~/^%\s+/ @skin.select #require "#{@md.doc_skin}" #FIX now ins=SiSU_Viz::Inserts.new @@ -328,7 +331,8 @@ module SiSU_Convert_footnotes @tuned_file << para end # debug 2003w46 adding revision control info - if @md.flag_auto_endnotes and @md.flag_separate_endnotes_make + if @md.flag_auto_endnotes \ + and @md.flag_separate_endnotes_make @tuned_file << "\n1~endnotes Endnotes <~0;0:0;u0>" #prob numbering, revisit end @tuned_file << "\n<ENDNOTES>" @@ -345,7 +349,8 @@ module SiSU_Convert_footnotes para.gsub!(/^#{num}~([a-z_\.]+)\s+(.+)/i,%{#{num}~\\1 #{title_no} \\2 <:name##{title_no}>}) else para.gsub!(/^#{num}~ /,"#{num}~#{title_no} #{title_no} ") #main end - if @md.toc_lev_limit and @md.toc_lev_limit < num + if @md.toc_lev_limit \ + and @md.toc_lev_limit < num para.gsub!(/^[2-6]~(?:~\S+)?\s*/,'!_ ') end para @@ -357,7 +362,8 @@ module SiSU_Convert_footnotes @tuned_file=[] data.each do |para| unless @md.set_heading_top - if para !~/^(?:@\S+:|0~\S+)\s/m and para !~/\A\s*\Z/m + if para !~/^(?:@\S+:|0~\S+)\s/m \ + and para !~/\A\s*\Z/m @md.set_heading_top=true head=if @md.title ; ":A~ #{@md.title}" else ':A~ [no title provided]' @@ -377,7 +383,9 @@ module SiSU_Convert_footnotes @tuned_file=[] data.each do |para| unless @md.set_heading_seg - if para !~/^(?:@\S+:|0~\S+|:[ABC]~)/m and para !~/\A\s*\Z/m and para !~/<:p[bn]>/ + if para !~/^(?:@\S+:|0~\S+|:[ABC]~)/m \ + and para !~/\A\s*\Z/m \ + and para !~/<:p[bn]>/ @md.set_heading_seg=true head=if @md.title ; "1~seg [#{@md.title}]" else '1~seg [segment]' @@ -397,7 +405,8 @@ module SiSU_Convert_footnotes @tuned_file=[] data.each do |para| unless @md.set_header_title - if para !~/^%{1,2}\s/m and para !~/\A\s*\Z/m + if para !~/^%{1,2}\s/m \ + and para !~/\A\s*\Z/m @tuned_file << "0~title #{@md.heading_seg_first}" @md.title=@md.heading_seg_first @md.set_header_title=true |