diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-10-19 21:19:47 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-10-19 21:19:47 -0400 |
commit | fa19bd4cdb7f9f9db99c99604250ceda77e527a8 (patch) | |
tree | 3689106b15c764c720d11fbe6da0d25418094d69 /lib/sisu/v5/html_segments.rb | |
parent | debian/changelog (5.7.0-1) (diff) | |
parent | v5 v6: cgi, sample search form, find & display endnotes from parent text object (diff) |
Merge tag 'sisu_5.7.1' into debian/sid
SiSU 5.7.1
Diffstat (limited to 'lib/sisu/v5/html_segments.rb')
-rw-r--r-- | lib/sisu/v5/html_segments.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v5/html_segments.rb b/lib/sisu/v5/html_segments.rb index 60cd51f1..06aac4e1 100644 --- a/lib/sisu/v5/html_segments.rb +++ b/lib/sisu/v5/html_segments.rb @@ -672,7 +672,7 @@ module SiSU_HTML_Seg @@seg_subtoc_array << subtoc end if @md.flag_auto_endnotes - if (dob.obj =~/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})[\d*+]+ <a name="#{Mx[:note]}[\d*+]+"/) \ + if (dob.obj =~/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})[\d*+]+\s*<a href="##{Mx[:note_ref]}[\d*+]+"/) \ && dob.is !=:code # endnote- endnote_array=[] if dob.obj=~/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}/m @@ -689,7 +689,7 @@ module SiSU_HTML_Seg note_match=note.dup note_match_seg=note.dup e_n=note_match_seg[/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,1] - try=e_n.split(/<br \/>/) + try=e_n.split(/<br(?: \/)?>/) try.each do |e| txt_obj={ txt: e } format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @@ -699,7 +699,7 @@ module SiSU_HTML_Seg end @@seg_endnotes_array << note_match end - try.join('<br \/>') + try.join('<br>') #% creation of separate end segment/page of all endnotes referenced back to reference segment m=/(?:#{Mx[:en_a_o]}[\d*+]+|#{Mx[:en_b_o]}[*+]\d+)\s+(.+?href=")(##{Mx[:note_ref]}[\d*+]+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi endnote_part_a=note_match_seg[m,1] |