From 63251bd46a2936a44b112c9f863c665f6bfe72b2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 10 Mar 2011 08:50:17 -0500 Subject: v2, v3: dal_substitutions_and_insertions: sisu header matching in codeblock, fix --- data/doc/sisu/CHANGELOG_v2 | 3 +++ data/doc/sisu/CHANGELOG_v3 | 3 +++ lib/sisu/v2/dal_substitutions_and_insertions.rb | 6 +++--- lib/sisu/v3/dal_substitutions_and_insertions.rb | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2 index cdd738a6..a5928f1f 100644 --- a/data/doc/sisu/CHANGELOG_v2 +++ b/data/doc/sisu/CHANGELOG_v2 @@ -34,6 +34,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.8.2.orig.tar.gz Unfortunate "grave" results for what is a pretty insignificant data entry typo (there are no doubt other such situations).] + * dal_substitutions_and_insertions: regex for sisu header matching (in sisu + markup code blocks), a fix + * texpdf: url (regex) pattern match fix (/https?/) %% 2.8.1.orig.tar.gz (2011-03-05:09/6) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 9814094d..933e3585 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -35,6 +35,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.3.orig.tar.gz Unfortunate "grave" results for what is a pretty insignificant data entry typo (there are no doubt other such situations).] + * dal_substitutions_and_insertions: regex for sisu header matching (in sisu + markup code blocks), a fix + * texpdf: url (regex) pattern match fix (/https?/) %% 3.0.2.orig.tar.gz (2011-03-05:09/6) diff --git a/lib/sisu/v2/dal_substitutions_and_insertions.rb b/lib/sisu/v2/dal_substitutions_and_insertions.rb index e1326232..c598b990 100644 --- a/lib/sisu/v2/dal_substitutions_and_insertions.rb +++ b/lib/sisu/v2/dal_substitutions_and_insertions.rb @@ -7,7 +7,7 @@ * Author: Ralph Amissah - * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved. + * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved. * License: GPL 3 or later: @@ -144,8 +144,8 @@ module SiSU_substitute_and_insert para.gsub!(/^(:?A~)\s*$/,'\1~ @title @author') #conditional header para.gsub!(/^((?:[1-9]|:?[A-C])~\S*)\s*$/,'\1~ [Note: heading marker::required title missing]~#') #conditional header for incorporated document 2004w12 if para =~/^@\S+?:/ - para.gsub!(/^@(\S+?):\s+/,"#{Mx[:meta_o]}\\1#{Mx[:meta_c]}") - para.gsub!(/^@(\S+?):([+-])\s+/,"#{Mx[:meta_o]}\\1\\2#{Mx[:meta_c]}") + para.gsub!(/^@(\S+?):(\s+|$)/,"#{Mx[:meta_o]}\\1#{Mx[:meta_c]}\\2") + para.gsub!(/^@(\S+?):([+-])(\s+|$)/,"#{Mx[:meta_o]}\\1\\2#{Mx[:meta_c]}\\3") end end end diff --git a/lib/sisu/v3/dal_substitutions_and_insertions.rb b/lib/sisu/v3/dal_substitutions_and_insertions.rb index 84b58756..cf3309ec 100644 --- a/lib/sisu/v3/dal_substitutions_and_insertions.rb +++ b/lib/sisu/v3/dal_substitutions_and_insertions.rb @@ -144,8 +144,8 @@ module SiSU_substitute_and_insert para.gsub!(/^(:?A~)\s*$/,'\1~ @title @author') #conditional header para.gsub!(/^((?:[1-9]|:?[A-C])~\S*)\s*$/,'\1~ [Note: heading marker::required title missing]~#') #conditional header for incorporated document 2004w12 if para =~/^@\S+?:/ - para.gsub!(/^@(\S+?):\s+/,"#{Mx[:meta_o]}\\1#{Mx[:meta_c]}") - para.gsub!(/^@(\S+?):([+-])\s+/,"#{Mx[:meta_o]}\\1\\2#{Mx[:meta_c]}") + para.gsub!(/^@(\S+?):(\s+|$)/,"#{Mx[:meta_o]}\\1#{Mx[:meta_c]}\\2") + para.gsub!(/^@(\S+?):([+-])(\s+|$)/,"#{Mx[:meta_o]}\\1\\2#{Mx[:meta_c]}\\3") end end end -- cgit v1.2.3