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 --- data/doc/sisu/CHANGELOG_v6 | 5 +++++ lib/sisu/current/html_format.rb | 4 ++-- lib/sisu/current/xhtml_epub2_segments.rb | 26 +++++++++++++------------- lib/sisu/develop/dp.rb | 9 +++++++-- lib/sisu/develop/html_format.rb | 4 ++-- lib/sisu/develop/sst_to_s_xml_sax.rb | 2 +- lib/sisu/develop/xhtml_epub2_segments.rb | 26 +++++++++++++------------- lib/sisu/develop/xml_dom.rb | 28 +++++++++++++++------------- lib/sisu/develop/xml_sax.rb | 10 +++++----- 9 files changed, 63 insertions(+), 51 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index 76d02fd1..4affbb53 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -60,6 +60,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.4.0.orig.tar.xz * track changes to sisu_version info * in dp (param) project_details used instead of sisu_version + * misc minor + * html endnote segment, endnote in heading, link back to html scroll + * epub endnote segment fails, issue with match, fix + * dp, remark if no existing option selected + ** SiSU "UnFrozen" - prior to end of Debian Freeze (upstream bugfix 6.3.2 (5.7.2) intended for Jessie (packaged for Debian as 5.7.1-2) was not accepted) 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 } diff --git a/lib/sisu/develop/dp.rb b/lib/sisu/develop/dp.rb index d5a72817..68f8c610 100644 --- a/lib/sisu/develop/dp.rb +++ b/lib/sisu/develop/dp.rb @@ -146,8 +146,13 @@ module SiSU_Param @@md=@md else @@md end - @@md.opt=@opt - @@md + begin + @@md.opt=@opt + @@md + rescue + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark('has an existing option been selected?') + exit + end end class MdDefault def rights(author,date) diff --git a/lib/sisu/develop/html_format.rb b/lib/sisu/develop/html_format.rb index a7b62586..b69c5d86 100644 --- a/lib/sisu/develop/html_format.rb +++ b/lib/sisu/develop/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/develop/sst_to_s_xml_sax.rb b/lib/sisu/develop/sst_to_s_xml_sax.rb index af3a6a13..8b1386b2 100644 --- a/lib/sisu/develop/sst_to_s_xml_sax.rb +++ b/lib/sisu/develop/sst_to_s_xml_sax.rb @@ -69,7 +69,7 @@ module SiSU_SimpleXML_ModelSax include SiSU_XML_Format require_relative 'rexml' # rexml.rb include SiSU_Rexml - @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0 + @@alt_id_count=0 @@tablefoot='' class Convert @@fns=nil diff --git a/lib/sisu/develop/xhtml_epub2_segments.rb b/lib/sisu/develop/xhtml_epub2_segments.rb index 7193c776..867f9f31 100644 --- a/lib/sisu/develop/xhtml_epub2_segments.rb +++ b/lib/sisu/develop/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 } diff --git a/lib/sisu/develop/xml_dom.rb b/lib/sisu/develop/xml_dom.rb index 60d57854..3664820d 100644 --- a/lib/sisu/develop/xml_dom.rb +++ b/lib/sisu/develop/xml_dom.rb @@ -591,19 +591,21 @@ WOK if @prog.tidy !=false if (@md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) - SiSU_Screen::Ansi.new( - @md.opt.act[:color_state][:set], - 'invert', - 'Using XML Tidy', - 'check document structure' - ).colorize unless @md.opt.act[:quiet][:set]==:on - tell=SiSU_Screen::Ansi.new( - @md.opt.act[:color_state][:set], - 'invert', - '', - '' - ) - tell.grey_open unless @md.opt.act[:quiet][:set]==:on + unless @md.opt.act[:quiet][:set]==:on + SiSU_Screen::Ansi.new( + @md.opt.act[:color_state][:set], + 'invert', + 'Using XML Tidy', + 'check document structure' + ).colorize + tell=SiSU_Screen::Ansi.new( + @md.opt.act[:color_state][:set], + 'invert', + '', + '' + ) + tell.grey_open + end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags tidy=SiSU_Env::SystemCall.new(@file,tidyfile) tidy.well_formed? diff --git a/lib/sisu/develop/xml_sax.rb b/lib/sisu/develop/xml_sax.rb index d922ca07..3a193a6a 100644 --- a/lib/sisu/develop/xml_sax.rb +++ b/lib/sisu/develop/xml_sax.rb @@ -496,11 +496,11 @@ WOK 'check document structure' ).colorize tell=SiSU_Screen::Ansi.new( - @md.opt.act[:color_state][:set], - 'invert', - '', - '' - ) + @md.opt.act[:color_state][:set], + 'invert', + '', + '' + ) tell.grey_open end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags -- cgit v1.2.3