diff options
-rw-r--r-- | data/doc/sisu/CHANGELOG_v6 | 3 | ||||
-rw-r--r-- | lib/sisu/v6/param.rb | 25 | ||||
-rw-r--r-- | lib/sisu/v6/shared_metadata.rb | 11 | ||||
-rw-r--r-- | sisu.org | 6 |
4 files changed, 30 insertions, 15 deletions
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index 3def58df..26f2bcef 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -39,6 +39,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.5.orig.tar.xz * param, metadata add 'Copyright:' tag to output related to copyright (Closes: #744381) syntax: inconsistency \:copyright: and \:license: +* param, remove trailing semicolon after :copyright: + (Closes: #744358) + * metadata, pdf, remove link to manifest page where --no-manifest is used (Closes: #744378) diff --git a/lib/sisu/v6/param.rb b/lib/sisu/v6/param.rb index 7cbb6ba7..60c9bb54 100644 --- a/lib/sisu/v6/param.rb +++ b/lib/sisu/v6/param.rb @@ -500,12 +500,9 @@ module SiSU_Param @h=build_hash(a) def copyright def text #you may wish to expand to take from all - s=if @h['copyright'] - @h['copyright'] - elsif @h['text'] - @h['text'] - elsif @h['main'] - @h['main'] + s=if @h['copyright'] then @h['copyright'] + elsif @h['text'] then @h['text'] + elsif @h['main'] then @h['main'] else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING Document Copyright missing; provide @rights: :copyright:').warn unless @opt.act[:quiet][:set]==:on '' @@ -558,7 +555,7 @@ module SiSU_Param validate_length(s,l,n) end def sep(str) - (str =~/https?:\/\/\S+$/) ? ' ;' : ';' + ' \\\\ ' end def all s=if @h['all'] then @h['all'] @@ -574,36 +571,36 @@ module SiSU_Param and copyright.translation \ and not copyright.translation.empty? v=sep(copyright.translation) - s +='\\\\ translation ' + copyright.translation + v + s +='translation: ' + copyright.translation + v end if defined? copyright.illustrations \ and copyright.illustrations \ and not copyright.illustrations.empty? v=sep(copyright.illustrations) - s +='\\\\ illustrations ' + copyright.illustrations + v + s +='illustrations: ' + copyright.illustrations + v end if defined? copyright.photographs \ and copyright.photographs \ and not copyright.photographs.empty? v=sep(copyright.photographs) - s +='\\\\ photographs ' + copyright.photographs + v + s +='photographs: ' + copyright.photographs + v end if defined? copyright.digitization \ and copyright.digitization \ and not copyright.digitization.empty? v=sep(copyright.digitization) - s +='\\\\ digitization ' + copyright.digitization + v + s +='digitization: ' + copyright.digitization + v end if defined? copyright.audio \ and copyright.audio \ and not copyright.audio.empty? v=sep(copyright.audio) - s +='\\\\ audio ' + copyright.audio + v + s +='audio: ' + copyright.audio + v end if defined? copyright.license \ and copyright.license \ and not copyright.license.empty? - s +='\\\\ License: ' + copyright.license + s +='License: ' + copyright.license end if s.empty? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING Document Rights information missing; provide @rights: :copyright:').warn unless @opt.act[:quiet][:set]==:on @@ -611,7 +608,7 @@ module SiSU_Param l,n=Db[:col_info_note],'rights.all' validate_length(s,l,n) end - s + s=s.gsub(/ [\\]+\s+$/,'') end s end diff --git a/lib/sisu/v6/shared_metadata.rb b/lib/sisu/v6/shared_metadata.rb index c2fe06b9..1fa57fa7 100644 --- a/lib/sisu/v6/shared_metadata.rb +++ b/lib/sisu/v6/shared_metadata.rb @@ -735,6 +735,13 @@ module SiSU_Metadata end @s end + def br + if @s \ + and @s.is_a?(String) + @s=@s.gsub(/(?:#{Mx[:br_line]}|\\\\)+/,'<br />') + end + @s + end def utf8 if @s \ and @s.is_a?(String) @@ -752,6 +759,7 @@ module SiSU_Metadata def xml_sax def meta_para inf_xml=char_enc(@inf).utf8 + inf_xml=char_enc(inf_xml).br <<WOK <metadata> #{Ax[:tab]}<meta>#{@tag.capitalize}:</meta> @@ -769,6 +777,7 @@ WOK def xml_dom def meta_para inf_xml=char_enc(@inf).utf8 + inf_xml=char_enc(inf_xml).br <<WOK #{Ax[:tab]}<header> #{Ax[:tab]*2}<meta>#{@tag.capitalize}:</meta> @@ -786,6 +795,7 @@ WOK def xhtml_scroll def meta_para inf_xml=char_enc(@inf).utf8 + inf_xml=char_enc(inf_xml).br <<WOK #{Ax[:tab]}<metadata> #{Ax[:tab]}<meta>#{@tag.capitalize}:</meta> @@ -805,6 +815,7 @@ WOK def meta_para inf_xml=char_enc(@inf).amp inf_xml=char_enc(inf_xml).utf8 + inf_xml=char_enc(inf_xml).br %{<p class="norm"> <b>#{@tag}</b>: #{inf_xml} </p>} @@ -1325,7 +1325,7 @@ please also create mailto links when using email adresses like: Regards, Daniel -**** TODO [#C] #744358 [w|u] sisu output: please do not add ';' after \:copyright: +**** DONE (6.0.5) [#C] #744358 [w|u] sisu output: please do not add ';' after \:copyright: :output:fix: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744358> From: Daniel Baumann <daniel.baumann@progress-technologies.net> @@ -1350,6 +1350,10 @@ semicolon, he would add one. Regards, Daniel +***** NOTES/COMMENTS + +fix copyright, remove trailing semi-colon + **** DONE (5.3.5::6.0.5) [#B] #744379 [w|u] sisu: missing includes doesn't give an error :processing:fix: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744379> |