aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/html_segments.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-15 19:27:16 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-15 19:27:16 +0100
commite1ec4bd2dad2bd22ad97cea398ae1cfcfae183a2 (patch)
tree6ffe3ae1b2453578a032ce053934a31f980645e9 /lib/sisu/v0/html_segments.rb
parentregex matching of images, (and rearrangement of conditionals) (diff)
mostly the arrangement of conditionals
Diffstat (limited to 'lib/sisu/v0/html_segments.rb')
-rw-r--r--lib/sisu/v0/html_segments.rb24
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb
index de96dd7d..595ad2dc 100644
--- a/lib/sisu/v0/html_segments.rb
+++ b/lib/sisu/v0/html_segments.rb
@@ -135,10 +135,13 @@ module SiSU_HTML_seg
unless para =~/^1~/; head1=$_ #;
end
end
- if @@is4 == 1 or para =~/^<ENDNOTES>|^<EOF>/
- if newfile == 1 or para =~/^<ENDNOTES>|^<EOF>/
+ if @@is4 == 1 \
+ or para =~/^<ENDNOTES>|^<EOF>/
+ if newfile == 1 \
+ or para =~/^<ENDNOTES>|^<EOF>/
newfile=0
- if para =~/^4~\S+/ or para =~/^<ENDNOTES>|^<EOF>/ # @@level4
+ if para =~/^4~\S+/ \
+ or para =~/^<ENDNOTES>|^<EOF>/ # @@level4
if tracking != 0
File.mkpath(@md.dir_out) unless FileTest.directory?(@md.dir_out) #bug - added specifically for nav! not needed by regular seg, check !!!
Seg.new('',@md).tail
@@ -260,7 +263,8 @@ module SiSU_HTML_seg
paranum=m[1].to_s
@p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum)
end
- if para =~/<:(?:code|alt|verse|group)>/m or @@flag_alt==true
+ if para =~/<:(?:code|alt|verse|group)>/m \
+ or @@flag_alt==true
if para =~/<:(?:code|alt|verse|group)>/m
@group_collect=[] #unless @group_collect.class == Array
@group_collect << @vz.margin_txt_0 + para.gsub(/<:(?:code|alt|verse|group)-end>/m,'') #watch !
@@ -304,10 +308,12 @@ module SiSU_HTML_seg
when /^code$/
@sto.seg_lev_para_ocn.code
when /null/
- if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ and para !~/^<!TZ!>/
+ if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ \
+ and para !~/^<!TZ!>/
format_txt_obj.gsub_body
@sto.seg_lev_para_ocn.para
- elsif para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ and para =~/^<!TZ!>/
+ elsif para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ \
+ and para =~/^<!TZ!>/
format_txt_obj.gsub_body
@sto.seg_lev_para_ocn.table_end
else para
@@ -388,7 +394,8 @@ module SiSU_HTML_seg
data.each do |para|
para.gsub!(/<a name=\"h\d.*?\">(.+?)<\/a>/mi,'\1')
if @md.flag_auto_endnotes
- if para =~/^[1234]~/ and not @@fn.empty?
+ if para =~/^[1234]~/ \
+ and not @@fn.empty?
@@seg_endnotes[@@fn]=[]
@@seg_endnotes[@@fn] << @@seg_endnotes_array
@@seg_endnotes_array=[] if para=~/^4~/
@@ -427,7 +434,8 @@ module SiSU_HTML_seg
@@seg_subtoc_array << para
end
if @md.flag_auto_endnotes
- if para =~/~[{\[][\d*+]+ <a name="_[\d*+]+"/ and not para =~/^<:code>/ # endnote-
+ if para =~/~[{\[][\d*+]+ <a name="_[\d*+]+"/ \
+ and not para =~/^<:code>/ # endnote-
endnote_array=[]
if para=~/~\{.+?\}\~/m
endnote_array << para.scan(/~\{.+?\}\~/m)