aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/xml.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/xml.rb
parentregex matching of images, (and rearrangement of conditionals) (diff)
mostly the arrangement of conditionals
Diffstat (limited to 'lib/sisu/v0/xml.rb')
-rw-r--r--lib/sisu/v0/xml.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/sisu/v0/xml.rb b/lib/sisu/v0/xml.rb
index e739bf59..2aa8bb56 100644
--- a/lib/sisu/v0/xml.rb
+++ b/lib/sisu/v0/xml.rb
@@ -297,7 +297,10 @@ WOK
if d_meta; xml_head(d_meta)
end
end
- @rcdc=true if @rcdc==false and (para =~/~metadata/ or para =~/1~meta\s+Document Information/)
+ if @rcdc==false \
+ and (para =~/~metadata/ or para =~/1~meta\s+Document Information/)
+ @rcdc=true
+ end
if para !~/(^0~|<ENDNOTES>|<EOF>)/
if para =~/.+?<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/
paranum=para[@regx,3]
@@ -357,11 +360,14 @@ WOK
#@@xml[:body] << "#{@tab*7}<text>#{para[@regx,2]}</text>\n" if para[@regx,2] # main text, contents, body KEEP
#@@xml[:body] << "#{@tab*6}</object>" << "\n" if para[@regx]
end
- elsif para =~/(Note|Endnotes?)/ and para !~/<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/
- elsif para =~/(MetaData)/ and para =~/<~(\d+);[m]\d+;\w\d+><#@dp:#@dp>$/ #debug 2003w46 add rc info
+ elsif para =~/(Note|Endnotes?)/ \
+ and para !~/<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/
+ elsif para =~/(MetaData)/ \
+ and para =~/<~(\d+);[m]\d+;\w\d+><#@dp:#@dp>$/ #debug 2003w46 add rc info
format_scroll=Format_scroll.new(@md,'<br /><a name="metadata">MetaData</a>')
para=format_scroll.bold_para
- elsif para =~/(Owner Details)/ and para !~/<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/
+ elsif para =~/(Owner Details)/ \
+ and para !~/<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/
format_scroll=Format_scroll.new(@md,'<br /><a name="owner.details">Owner Details</a>')
@@xml[:owner_details]=format_scroll.bold_para
para=''
@@ -370,7 +376,10 @@ WOK
format_text=Format_text_object.new(one,two)
para=format_text.seg_no_paranum
end
- para='' if para =~/<a name="n\d+">/ and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/ # -endnote
+ if para =~/<a name="n\d+">/ \
+ and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/ # -endnote
+ para=''
+ end
if para =~/.*<:#>.*$/
para=if para =~ /<:i[1-9]>/
format_text=Format_text_object.new(para,'')