diff options
Diffstat (limited to 'lib/sisu/v0/xml.rb')
-rw-r--r-- | lib/sisu/v0/xml.rb | 19 |
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,'') |