d: misc mostly minor
authorRalph Amissah <ralph@amissah.com>
Fri, 21 Nov 2014 04:10:12 +0000 (23:10 -0500)
committerRalph Amissah <ralph@amissah.com>
Mon, 8 Dec 2014 05:18:15 +0000 (00:18 -0500)
* 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
lib/sisu/current/html_format.rb
lib/sisu/current/xhtml_epub2_segments.rb
lib/sisu/develop/dp.rb
lib/sisu/develop/html_format.rb
lib/sisu/develop/sst_to_s_xml_sax.rb
lib/sisu/develop/xhtml_epub2_segments.rb
lib/sisu/develop/xml_dom.rb
lib/sisu/develop/xml_sax.rb

index 76d02fd131c1223878eec0a04024bdc67367eb52..4affbb5346a0af3bc282886d7716b8b553efba95 100644 (file)
@@ -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)
index d5910e9a06797ac7a0f7acc8de2a8559c9ed1fdd..af9b9c3c0ca0f31ae8682a5b0f61f9bfd03879bb 100644 (file)
@@ -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?
       %{
   <p class="endnote">
     #{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:html]}#{@endnote_part_b}
index 3f7e878fef51494947d5ced0ffbd7c214039be39..b8af25dc712a80d0879b54c9ed74e060fc0740f7 100644 (file)
@@ -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('<br \/>')
               #% 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 }
index d5a72817c34af8e0b4880d05a5c1934709a8145f..68f8c6106c68f371b40071f47ca55e90c4442417 100644 (file)
@@ -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)
index a7b62586bc7a917dbc0c4c6b6290dcb569278b29..b69c5d86f05bf46ab7d7895d49885ee68f846515 100644 (file)
@@ -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?
       %{
   <p class="endnote">
     #{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:html]}#{@endnote_part_b}
index af3a6a139d33c31ea3cc5dd5bfec98a0763a5e8a..8b1386b2ad99894a759dd6916a300f91c61de901 100644 (file)
@@ -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
index 7193c7762982b0b65beeb240987411a0f1be7128..867f9f3122b2390efcd98521ea0eb61fb9ef1e44 100644 (file)
@@ -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('<br \/>')
               #% 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 }
index 60d57854acf73d48a2f768f31d8d96c0ccd3a878..3664820d24b8d962a3cf8badb5f4bd16afd8a724 100644 (file)
@@ -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?
index d922ca077f128c1a985e346edc1b2a7f4028bfb2..3a193a6a7c2a6a5bb705c1a45fc7fbb4e37240e7 100644 (file)
@@ -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