From e5fe0553d62a1a5f5047451faaaa9792c483b493 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 1 Oct 2012 15:21:25 -0400 Subject: v3: html, epub, group text, bullet, fix --- data/doc/sisu/CHANGELOG_v3 | 3 +++ lib/sisu/v3/dal_syntax.rb | 4 ++-- lib/sisu/v3/epub_tune.rb | 2 +- lib/sisu/v3/html_tune.rb | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 93ce9c8c..b470bec8 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -57,6 +57,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.3.orig.tar.xz * group text, pass through special characters safe * poem, bold etc. +* v3: html, epub, fix + * group text, bullet + %% 3.3.2.orig.tar.xz (2012-06-30:26/6) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.3.2 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.3.2-1 diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb index 5b308009..8f029fe5 100644 --- a/lib/sisu/v3/dal_syntax.rb +++ b/lib/sisu/v3/dal_syntax.rb @@ -453,8 +453,8 @@ module SiSU_DAL_Syntax dob=fontface(dob) dob.obj=dob.obj.gsub(/<[:e]\s+(.+?)!?>/, "#{Mx[:en_a_o]}\\1#{Mx[:en_a_c]}"). #not tested - gsub(/^\s*_\*\s*/, - "#{Mx[:gl_bullet]}"). #bullets, shortcut + gsub(/(^|#{Mx[:br_nl]})\s*_\*\s*/, + "\\1#{Mx[:gl_bullet]}"). #bullets, shortcut gsub(/=\{(.+?)\}/, "#{Mx[:idx_o]}\\1#{Mx[:idx_c]}"). gsub(/^\s*_([1-9])\*\s*/, diff --git a/lib/sisu/v3/epub_tune.rb b/lib/sisu/v3/epub_tune.rb index 3a5669c6..a9bf31b0 100644 --- a/lib/sisu/v3/epub_tune.rb +++ b/lib/sisu/v3/epub_tune.rb @@ -238,7 +238,7 @@ module SiSU_EPUB_Tune gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\1'). gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'\1'). # tt, kbd gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,''). - gsub(/^#{Mx[:gl_bullet]}/m,'●  '). + gsub(/#{Mx[:gl_bullet]}/m,'●  '). gsub(/#{Mx[:nbsp]}/,' '). gsub(/<(p|br)>/,'<\1 />') dob.obj=SiSU_EPUB_Tune::CleanXHTML.new(dob.obj).clean diff --git a/lib/sisu/v3/html_tune.rb b/lib/sisu/v3/html_tune.rb index a1c9a8dc..f7b60cff 100644 --- a/lib/sisu/v3/html_tune.rb +++ b/lib/sisu/v3/html_tune.rb @@ -354,7 +354,7 @@ module SiSU_HTML_Tune gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\1'). gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,'\1'). # tt, kbd gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,''). - gsub(/^#{Mx[:gl_bullet]}/m,'●  '). + gsub(/#{Mx[:gl_bullet]}/m,'●  '). gsub(/#{Mx[:nbsp]}/,' '). gsub(/<(p|br)>/,'<\1 />') dob=SiSU_HTML_Tune::CleanHTML.new(dob).clean -- cgit v1.2.3