diff options
Diffstat (limited to 'lib/sisu/v0/html_scroll.rb')
-rw-r--r-- | lib/sisu/v0/html_scroll.rb | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index 30640f30..483b5222 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -86,7 +86,10 @@ module SiSU_HTML_scroll if para =~/^\d~metadata\s+Metadata/ para.gsub!(/(Metadata)/,'\1<a name="metadata"></a>') end - @rcdc=true if @rcdc==false and (para =~/^\d~metadata/ or para =~/^1~meta\s+Document Information/) + if @rcdc==false \ + and (para =~/^\d~metadata/ or para =~/^1~meta\s+Document Information/) + @rcdc=true + end if para !~/(^0~|<ENDNOTES>|<EOF>)/ unless para =~/^<:code>/; para.gsub!(/~[{\[].+?[}\]]~\s+/m,' ') end @@ -126,13 +129,16 @@ module SiSU_HTML_scroll end end end - elsif para =~/^[1-9]~\S*/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + elsif para =~/^[1-9]~\S*/ \ + and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,para) para=format_txt_obj.bold_header - elsif para =~/Endnotes?/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + elsif para =~/Endnotes?/ \ + and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="notes">Note</a>') para=format_txt_obj.bold_para - elsif para =~/Owner Details/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + elsif para =~/Owner Details/ \ + and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="owner.details">Owner Details</a>') @scr[:owner_details]=format_txt_obj.bold_para para='' @@ -141,7 +147,10 @@ module SiSU_HTML_scroll format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) para=format_seg.no_paranum end - para='' if (para =~/<a name="n\d+">/ and para =~/^(?:\^~\d+\s|<!e[:_]\d+!>)/) # hmmm re-adjusted 200507, for alt endnote which should again be matched ^~ ... not in response to problem though + if para =~/<a name="n\d+">/ \ + and para =~/^(?:\^~\d+\s|<!e[:_]\d+!>)/ # hmmm re-adjusted 200507, for alt endnote which should again be matched ^~ ... not in response to problem though + para='' + end if para =~/<:center>/ #rules changed now a <p class="center" problems may arise 2005w11 ! one,two=/(.*)<:center>(.*)/.match(para).captures format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,one,two) |