aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-22 18:30:22 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-22 18:31:56 -0400
commitfda25aa07788a45272285b9832e94629174fd345 (patch)
treed5a7d9214ad53e87cc9f3efe00cfdf72961f1061
parentversion date (diff)
dal, internal link: exclude parentheses and square brackets from matching
(requested fix, Ben Armstrong)
-rw-r--r--CHANGELOG_v212
-rw-r--r--data/doc/sisu/v2/CHANGELOG12
-rw-r--r--lib/sisu/v2/dal_syntax.rb6
3 files changed, 17 insertions, 13 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2
index 23da40e1..efec522b 100644
--- a/CHANGELOG_v2
+++ b/CHANGELOG_v2
@@ -12,7 +12,7 @@ Reverse Chronological:
%% Development branch UNSTABLE
-%% 2.7.8.orig.tar.gz (2010-10-21:42/4)
+%% 2.7.8.orig.tar.gz (2010-10-22:42/5)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz
sisu_2.7.8.orig.tar.gz
sisu_2.7.8-1.dsc
@@ -20,10 +20,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz
[debian freeze, fix]
- * html, internal link: remove space between link & following punctuation
- (requested fix, Ben Armstrong)
-
- * epub, internal link: remove space between link & following punctuation
+ * internal links
+ * dal, exclude parentheses and square brackets from matching
+ (requested fix, Ben Armstrong)
+ * html, remove space between link & following punctuation
+ (requested fix, Ben Armstrong)
+ * epub, remove space between link & following punctuation
%% 2.7.7.orig.tar.gz (2010-10-17:41/7)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz
diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG
index d69d2289..5af46b2a 100644
--- a/data/doc/sisu/v2/CHANGELOG
+++ b/data/doc/sisu/v2/CHANGELOG
@@ -12,7 +12,7 @@ Reverse Chronological:
%% Development branch UNSTABLE
-%% 2.7.8.orig.tar.gz (2010-10-21:42/4)
+%% 2.7.8.orig.tar.gz (2010-10-22:42/5)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz
sisu_2.7.8.orig.tar.gz
sisu_2.7.8-1.dsc
@@ -20,10 +20,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz
[debian freeze, fix]
- * html, internal link: remove space between link & following punctuation
- (requested fix, Ben Armstrong)
-
- * epub, internal link: remove space between link & following punctuation
+ * internal links
+ * dal, exclude parentheses and square brackets from matching
+ (requested fix, Ben Armstrong)
+ * html, remove space between link & following punctuation
+ (requested fix, Ben Armstrong)
+ * epub, remove space between link & following punctuation
%% 2.7.7.orig.tar.gz (2010-10-17:41/7)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.7.orig.tar.gz
diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb
index fbc62158..c4059fa8 100644
--- a/lib/sisu/v2/dal_syntax.rb
+++ b/lib/sisu/v2/dal_syntax.rb
@@ -384,11 +384,11 @@ module SiSU_Syntax
"\\1#{Mx[:lnk_o]}\\2#{Mx[:lnk_c]}\\3") #linked (text or image, however text cannot include modified face, e.g. bold, ital, underline)
dob.obj.gsub!(/(^|[#{Mx[:gl_c]}#{Mx[:lnk_c]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}(\s])((?:https?|ftp):\/\/\S+?\.[^>< ]+?)([,.;'"]?)(?=[\s#{Mx[:en_a_c]}#{Mx[:en_b_c]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}]|$)/m,
%{\\1#{Mx[:url_o]}\\2#{Mx[:url_c]}\\3})
- dob.obj.gsub!(/#{Mx[:lnk_c]}#(\S+?[^>< ]+?)([,.;'"]?)(?=[\s#{Mx[:en_a_c]}#{Mx[:en_b_c]}#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}]|$)/m,
+ dob.obj.gs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