From 802c36252a6a8d652970ef207e36ed1bc09be0a7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 20 Nov 2014 23:10:12 -0500 Subject: d: misc mostly minor * html endnote segment, heading endnote, link back to html scroll * epub endnote segment fails, issue with match, fix * dp, remark if no existing option selected --- lib/sisu/current/html_format.rb | 4 ++-- lib/sisu/current/xhtml_epub2_segments.rb | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'lib/sisu/current') diff --git a/lib/sisu/current/html_format.rb b/lib/sisu/current/html_format.rb index d5910e9a..af9b9c3c 100644 --- a/lib/sisu/current/html_format.rb +++ b/lib/sisu/current/html_format.rb @@ -1147,8 +1147,8 @@ WOK def initialize(md,txt) super(md,txt) end - def endnote_seg_body(fn='') #FIX #url construction keep within single line... BUG WATCH 200408 - fn='doc' if fn.to_s.empty? #you may wish to reconsider, sends to 'doc' where no segment info + def endnote_seg_body(fn='') + fn="../#{@md.fnb}" if fn.to_s.empty? %{

#{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:html]}#{@endnote_part_b} diff --git a/lib/sisu/current/xhtml_epub2_segments.rb b/lib/sisu/current/xhtml_epub2_segments.rb index 3f7e878f..b8af25dc 100644 --- a/lib/sisu/current/xhtml_epub2_segments.rb +++ b/lib/sisu/current/xhtml_epub2_segments.rb @@ -386,18 +386,18 @@ WOK else sto.para end end - elsif dob.is ==:block \ - || dob.is ==:group \ - || dob.is ==:alt - sto.para #fix this should be block type specific #FIX - elsif dob.is==:verse - sto.verse - elsif dob.is==:code - sto.code - elsif dob.is==:table - sto.table - elsif dob.is==:break - sto.break + elsif dob.is ==:block \ + || dob.is ==:group \ + || dob.is ==:alt + sto.para #fix this should be block type specific #FIX + elsif dob.is==:verse + sto.verse + elsif dob.is==:code + sto.code + elsif dob.is==:table + sto.table + elsif dob.is==:break + sto.break end if @md.flag_separate_endnotes # may need to revisit, check dob.obj=dob.obj.gsub(/"\s+href="##{Mx[:note_ref]}(\d+)">/,%{" href=\"endnotes#{Sfx[:epub_xhtml]}##{Mx[:note_ref]}\\1">}) #endnote- twice #removed file type @@ -526,7 +526,7 @@ WOK end try.join('
') #% creation of separate end segment/page of all endnotes referenced back to reference segment - m=/(?:#{Mx[:en_a_o]}(?:\d|#{ast}|#{pls})+|#{Mx[:en_b_o]}(?:#{ast}|#{pls})\d+)\s+(.+?href=")(#note_ref(?:\d|_a|_b)+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi + m=/(?:#{Mx[:en_a_o]}(?:\d|#{ast}|#{pls})+|#{Mx[:en_b_o]}(?:#{ast}|#{pls})\d+)\s+(.+?href=")(##{Mx[:note_ref]}(?:\d|_a|_b)+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi endnote_part_a=note_match_seg[m,1] endnote_part_b=note_match_seg[m,2] txt_obj={ endnote_part_a: endnote_part_a, endnote_part_b: endnote_part_b } -- cgit v1.2.3