From 92b4747c4f5b4f6753587d2db969fe3d2c4ca077 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 12 Oct 2014 10:32:54 -0400 Subject: v5: html, reduce difference with v6 (removal of some trailing slashes


) --- data/doc/sisu/CHANGELOG_v5 | 3 +++ lib/sisu/v5/html.rb | 14 +++++++------- lib/sisu/v5/html_concordance.rb | 4 ++-- lib/sisu/v5/html_format.rb | 20 +++++++++----------- lib/sisu/v5/html_lite_shared.rb | 2 +- lib/sisu/v5/html_manifest.rb | 6 +++--- lib/sisu/v5/html_promo.rb | 16 ++++++++-------- lib/sisu/v5/html_scroll.rb | 2 +- lib/sisu/v5/html_segments.rb | 4 ++-- lib/sisu/v5/html_tune.rb | 6 +++--- 10 files changed, 39 insertions(+), 38 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 0e15c942..52d6c7ea 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -38,6 +38,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.7.0.orig.tar.xz sisu_5.7.0.orig.tar.xz sisu_5.7.0-1.dsc +* html, reduce difference with v6 + * removal of some trailing slashes


+ * moved files: harvest* to html_harvest* * --maintenance revisited, bin/sisu, hub, urls --maintenance, fix required diff --git a/lib/sisu/v5/html.rb b/lib/sisu/v5/html.rb index 047ce9f9..76dbe2a2 100644 --- a/lib/sisu/v5/html.rb +++ b/lib/sisu/v5/html.rb @@ -335,10 +335,10 @@ module SiSU_HTML

-(relatively static) RSS feeds for DOCUMENTS:
-RSS feed http://www.jus.uio.no/lm/rssfeed/documents.xml
-RSS feed http://www.jus.uio.no/lm/rssfeed/tradelaw.xml
-RSS feed http://www.jus.uio.no/lm/rssfeed/environmental.xml
+(relatively static) RSS feeds for DOCUMENTS:
+RSS feed http://www.jus.uio.no/lm/rssfeed/documents.xml
+RSS feed http://www.jus.uio.no/lm/rssfeed/tradelaw.xml
+RSS feed http://www.jus.uio.no/lm/rssfeed/environmental.xml

info@address.com

@@ -383,7 +383,7 @@ WOK toc[:seg_mini]=format_toc.mini_lev0 title=if dob.ocn ==0 then linkname else - @@toc[:scr] << '
' + @@toc[:scr] << '
' %{#{linkname}} end txt_obj={ txt: title } @@ -425,7 +425,7 @@ WOK else linkname end else - @@toc[:scr] << '
' + @@toc[:scr] << '
' %{#{linkname}} end txt_obj={ txt: title } @@ -666,7 +666,7 @@ WOK @segtoc << "#{@vz.table_close*1}\n" tmp_head=nil if @md.prefix_a - tmp_head ||= %{

#{@md.prefix_a}\n} + tmp_head ||= %{

#{@md.prefix_a}\n} toc_shared << tmp_head.dup @segtoc << tmp_head.dup end diff --git a/lib/sisu/v5/html_concordance.rb b/lib/sisu/v5/html_concordance.rb index 51acabef..32a2ea35 100644 --- a/lib/sisu/v5/html_concordance.rb +++ b/lib/sisu/v5/html_concordance.rb @@ -176,10 +176,10 @@ WOK #{toc}

#{@doc_details} -

Word index links are to html versions of the text the segmented version followed by the scroll (single document) version.
[For segmented text references [T1], [T2] or [T3] appearing without a link, indicates that the word appears in a title (or subtitle) of the text (that is identifiable by the appended object citation number).]

+

Word index links are to html versions of the text the segmented version followed by the scroll (single document) version.
[For segmented text references [T1], [T2] or [T3] appearing without a link, indicates that the word appears in a title (or subtitle) of the text (that is identifiable by the appended object citation number).]

(The word listing/index is Case sensitive: Capitalized words appear before lower case)

- word (number of occurences)
linked references to word within document
+ word (number of occurences)
linked references to word within document
[if number of occurences exceed number of references - word occurs more than once in at least one reference. Footnote/endnotes are either assigned to the paragraph from which they are referenced or ignored, so it is relevant to check the footnotes referenced from within a paragraph as well.]

diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/v5/html_format.rb index c34759cf..e99f1b5f 100644 --- a/lib/sisu/v5/html_format.rb +++ b/lib/sisu/v5/html_format.rb @@ -301,7 +301,7 @@ WOK   #{@vz.table_close} -

} +

} else '' end end @@ -324,7 +324,7 @@ WOK #{doc_types} #{up_button} #{@vz.table_close} -

} +

} else '' end end @@ -354,7 +354,7 @@ WOK  #{firstseg}  #{@vz.table_close} -

} +

} else '' end end @@ -422,9 +422,7 @@ WOK #{@stylesheet.css_head} #{@vz.color_body} - - -} +} end def concordance if @md.concord_make @@ -513,7 +511,7 @@ WOK rights=SiSU_HTML_Tune::CleanHTML.new(@md.rights.all).clean_for_html rights=rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright © ') %{

Rights: #{rights}

-

} +

} end self end @@ -1021,7 +1019,7 @@ WOK end def heading_normal(tag,attrib) section_break=(tag=~/h[1-5]/) \ - ? '



' + ? '


' : '' %{#{section_break}
@@ -1179,13 +1177,13 @@ WOK
#{@txt} #{@two} -

} +

} end def navigation_toc_lev1 %{#{@banner.nav_toc}} end def navigation_toc_lev2 #change bold use css - %{

+ %{

@@ -1197,7 +1195,7 @@ WOK #{@vz.table_close}} end def navigation_toc_lev3 #change bold use css - %{

+ %{

diff --git a/lib/sisu/v5/html_lite_shared.rb b/lib/sisu/v5/html_lite_shared.rb index 7c3cdf0f..d766b54c 100644 --- a/lib/sisu/v5/html_lite_shared.rb +++ b/lib/sisu/v5/html_lite_shared.rb @@ -104,7 +104,7 @@ module SiSU_FormatShared w=%{width="#{w}"} if w h=%{height="#{h}"} if h c=m[/"(.+?)"/m,1] - caption=%{

#{c}

} if c + caption=%{

#{c}

} if c png=m.scan(/\S+/)[0] ins=if u \ and u.strip !~/^image$/ diff --git a/lib/sisu/v5/html_manifest.rb b/lib/sisu/v5/html_manifest.rb index 45ee2aae..d3e5871c 100644 --- a/lib/sisu/v5/html_manifest.rb +++ b/lib/sisu/v5/html_manifest.rb @@ -158,7 +158,7 @@ module SiSU_Manifest if @o_str.dump_or_redirect? '' elsif src==:src #check - %{
#{@brace_url.xml_open}#{url}/#{file}#{@brace_url.xml_close}} + %{
#{@brace_url.xml_open}#{url}/#{file}#{@brace_url.xml_close}} else %{

#{@brace_url.xml_open}#{url}/#{file}#{@brace_url.xml_close}

} end @@ -265,7 +265,7 @@ module SiSU_Manifest end end def metadata(id,info) - info=info.to_s.gsub(/(?:#{Mx[:br_line]}|\\)+/,'
') + info=info.to_s.gsub(/(?:#{Mx[:br_line]}|\\)+/,'
') @manifest[:html] << %{\n} end def links(url,lnk,target) @@ -1009,7 +1009,7 @@ WOK

#{id}:

#{info}

-
+
#{vz.credits_sisu_manifest}
diff --git a/lib/sisu/v5/html_promo.rb b/lib/sisu/v5/html_promo.rb index 57b45639..1f2b0388 100644 --- a/lib/sisu/v5/html_promo.rb +++ b/lib/sisu/v5/html_promo.rb @@ -145,7 +145,7 @@ module SiSU_HTML_Promo @prod['form'] ? %{

#{@prod['form']}

} : '' end def nick - @prod['nick'] ? %{(#{@prod['nick']})
} : '' + @prod['nick'] ? %{(#{@prod['nick']})
} : '' end def update @prod['update'] ? %{

Updated: #{@prod['update']}

} : '' @@ -186,7 +186,7 @@ module SiSU_HTML_Promo else nil end form=if action - '
' + @env.widget.search_form('hyperestraier',action,'',table) + '
' + @env.widget.search_form('hyperestraier',action,'',table) else '' end form @@ -208,7 +208,7 @@ module SiSU_HTML_Promo end end def image - @prod['image'] ? %{
} : '' + @prod['image'] ? %{
} : '' end def url_link @url_=if @prod['url'] =~/https?:/ @@ -296,7 +296,7 @@ module SiSU_HTML_Promo def output_form_sponsor(type,id) cell=cell(@ad[:promo][type][id],prod_id) <<-WOK -
+
#{cell.site_link} #{cell.blurb} #{cell.links} @@ -306,7 +306,7 @@ module SiSU_HTML_Promo prod_id=id.gsub(/id_/,'') cell=cell(@ad[:promo][type][id],prod_id) < +
#{cell.site_link} #{cell.author} #{cell.year} @@ -330,7 +330,7 @@ WOK prod_type=((id=~/id_(?:[0-9x]){10,13}/i) ? 'isbn' : 'id') id_detail=%{

#{prod_type}: #{prod_id}

} < +
#{cell.site_link} #{cell.author} #{cell.year} @@ -346,7 +346,7 @@ WOK prod_id=id.gsub(/id_/,'') cell=cell(@ad[:promo][type][id],prod_id) < +
#{cell.site_link} #{cell.editor} #{cell.issn} @@ -363,7 +363,7 @@ WOK cell=cell(@ad[:promo][type][id],prod_id) #translate date (dd month yyyy) from 2007-03-04 and ruby conversion < +
#{cell.site_link} #{cell.date} #{cell.location} diff --git a/lib/sisu/v5/html_scroll.rb b/lib/sisu/v5/html_scroll.rb index dc636378..1b632f56 100644 --- a/lib/sisu/v5/html_scroll.rb +++ b/lib/sisu/v5/html_scroll.rb @@ -134,7 +134,7 @@ module SiSU_HTML_Scroll end elsif dob.is==:break \ and dob.from==:markup - '


' + '


' elsif dob.is==:heading_insert x=if dob.ln==0 unless dob.obj.empty? diff --git a/lib/sisu/v5/html_segments.rb b/lib/sisu/v5/html_segments.rb index 555b75bb..4054e6fc 100644 --- a/lib/sisu/v5/html_segments.rb +++ b/lib/sisu/v5/html_segments.rb @@ -443,7 +443,7 @@ module SiSU_HTML_Seg @@seg[:tocband_banner] \ << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav]) @@seg[:tocband_bannerless] \ - << '
' \ + << '
' \ << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav]) if @title_banner_ @@seg[:headings] \ @@ -570,7 +570,7 @@ module SiSU_HTML_Seg sto.table elsif dob.is==:break \ and dob.from==:markup - '


' + '


' end if @md.flag_separate_endnotes dob.obj=dob.obj.gsub(/"\s+href="#(#{Mx[:note]}\d+)">/,%{" href=\"endnotes#{Sfx[:html]}#\\1">}) #endnote- twice #removed file type diff --git a/lib/sisu/v5/html_tune.rb b/lib/sisu/v5/html_tune.rb index 026a1177..bd934ecc 100644 --- a/lib/sisu/v5/html_tune.rb +++ b/lib/sisu/v5/html_tune.rb @@ -119,7 +119,7 @@ module SiSU_HTML_Tune end str=str.gsub(/#{Mx[:gl_o]}(#[0-9]{3})#{Mx[:gl_c]}/u,'&\1;'). gsub(/#{Mx[:gl_o]}#([a-z]{2,4})#{Mx[:gl_c]}/u,'&\1;'). - gsub(/[\\]{2}/m,'
') + gsub(/[\\]{2}/m,'
') end end class Tune @@ -187,7 +187,7 @@ module SiSU_HTML_Tune w=%{width="#{w}"} if w h=%{height="#{h}"} if h c=m[/"(.+?)"/m,1] - caption=%{

#{c}

} if c + caption=%{

#{c}

} if c png=m.scan(/\S+/)[0] image_path=@md.file.output_path.html_seg.rel_image #image_path=(@md.fns =~/\.-ss[tm]$/) \ @@ -277,7 +277,7 @@ module SiSU_HTML_Tune def markup(dob) dob.obj=dob.obj.gsub(/#{Mx[:mk_o]}#([a-zA-Z]+)#{Mx[:mk_c]}/,'&\1;'). gsub(/#{Mx[:mk_o]}(#[0-9]+)#{Mx[:mk_c]}/,'&\1;') - dob.obj=dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'
') unless dob.is==:table + dob.obj=dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'
') unless dob.is==:table dob.obj=dob.obj.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'\1'). gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'\1'). gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'\1'). -- cgit v1.2.3