From 84fcc4fb34a41303b4e87aec0e486ec5c3864b64 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Jul 2014 18:41:30 -0400 Subject: v5 v6: docbook, code & other blocks markup --- data/doc/sisu/CHANGELOG_v5 | 3 +++ data/doc/sisu/CHANGELOG_v6 | 3 +++ lib/sisu/v5/xml_docbook5.rb | 5 ++++- lib/sisu/v5/xml_shared.rb | 5 ++++- lib/sisu/v6/xml_docbook5.rb | 5 ++++- lib/sisu/v6/xml_shared.rb | 5 ++++- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 1a1cd366..df99dc24 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -46,6 +46,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.5.1.orig.tar.xz * src, sisupod, bring back in line +* docbook, + * code & other block markup + %% 5.5.0.orig.tar.xz (2014-07-11:27/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_5.5.0 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_5.5.0-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index b8af7573..4858e410 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -36,6 +36,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.1.1.orig.tar.xz * src, sisupod, bring back in line +* docbook, + * code & other block markup + %% 6.1.0.orig.tar.xz (2014-07-11:27/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_6.1.0 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_6.1.0-1 diff --git a/lib/sisu/v5/xml_docbook5.rb b/lib/sisu/v5/xml_docbook5.rb index 3a59f839..7326c332 100644 --- a/lib/sisu/v5/xml_docbook5.rb +++ b/lib/sisu/v5/xml_docbook5.rb @@ -163,7 +163,10 @@ module SiSU_XML_Docbook_Book end def markup_text(data) data.each_with_index do |o,i| - if o.is ==:heading || o.is ==:para || o.is ==:open_close_tags + if o.is ==:heading \ + || o.is ==:para \ + || o.of ==:block \ + || o.is ==:open_close_tags o=@trans.markup_docbook(o) #unless o.obj==nil end end diff --git a/lib/sisu/v5/xml_shared.rb b/lib/sisu/v5/xml_shared.rb index f1113495..5670f68d 100644 --- a/lib/sisu/v5/xml_shared.rb +++ b/lib/sisu/v5/xml_shared.rb @@ -485,7 +485,10 @@ module SiSU_XML_Munge gsub(/#{Mx[:nbsp]}/,' '). #  not available gsub(/<(p|br)>/,'<\1 />') dob.obj=clean(dob.obj) - else # codeblock + elsif dob.is == :code + dob.obj=dob.obj.gsub(/&/m,'&'). #sort + gsub(//,'>') + else # p dob.is ?? end dob end diff --git a/lib/sisu/v6/xml_docbook5.rb b/lib/sisu/v6/xml_docbook5.rb index b3e9e035..a1854cdb 100644 --- a/lib/sisu/v6/xml_docbook5.rb +++ b/lib/sisu/v6/xml_docbook5.rb @@ -163,7 +163,10 @@ module SiSU_XML_Docbook_Book end def markup_text(data) data.each_with_index do |o,i| - if o.is ==:heading || o.is ==:para || o.is ==:open_close_tags + if o.is ==:heading \ + || o.is ==:para \ + || o.of ==:block \ + || o.is ==:open_close_tags o=@trans.markup_docbook(o) #unless o.obj==nil end end diff --git a/lib/sisu/v6/xml_shared.rb b/lib/sisu/v6/xml_shared.rb index 3e8ddf50..8f4024eb 100644 --- a/lib/sisu/v6/xml_shared.rb +++ b/lib/sisu/v6/xml_shared.rb @@ -485,7 +485,10 @@ module SiSU_XML_Munge gsub(/#{Mx[:nbsp]}/,' '). #  not available gsub(/<(p|br)>/,'<\1 />') dob.obj=clean(dob.obj) - else # codeblock + elsif dob.is == :code + dob.obj=dob.obj.gsub(/&/m,'&'). #sort + gsub(//,'>') + else # p dob.is ?? end dob end -- cgit v1.2.3