aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-22 18:32:18 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-22 18:32:18 -0400
commit6632e4350372f26572038bdf02d0bf584e3c6945 (patch)
treeea528a526ab82824202cad0db4f5a9b0c7c34ff5
parentdal, internal link: exclude parentheses and square brackets from matching (diff)
html, internal link: remove space between link & parentheses or square brackets
-rw-r--r--CHANGELOG_v21
-rw-r--r--data/doc/sisu/v2/CHANGELOG1
-rw-r--r--lib/sisu/v2/html_tune.rb2
3 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2
index efec522b..27820ea6 100644
--- a/CHANGELOG_v2
+++ b/CHANGELOG_v2
@@ -25,6 +25,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz
(requested fix, Ben Armstrong)
* html, remove space between link & following punctuation
(requested fix, Ben Armstrong)
+ * html, remove space between link & parentheses or square brackets
* epub, remove space between link & following punctuation
%% 2.7.7.orig.tar.gz (2010-10-17:41/7)
diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG
index 5af46b2a..1b76710f 100644
--- a/data/doc/sisu/v2/CHANGELOG
+++ b/data/doc/sisu/v2/CHANGELOG
@@ -25,6 +25,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.8.orig.tar.gz
(requested fix, Ben Armstrong)
* html, remove space between link & following punctuation
(requested fix, Ben Armstrong)
+ * html, remove space between link & parentheses or square brackets
* epub, remove space between link & following punctuation
%% 2.7.7.orig.tar.gz (2010-10-17:41/7)
diff --git a/lib/sisu/v2/html_tune.rb b/lib/sisu/v2/html_tune.rb
index 12501d6c..eddd3049 100644
--- a/lib/sisu/v2/html_tune.rb
+++ b/lib/sisu/v2/html_tune.rb
@@ -305,7 +305,7 @@ module SiSU_HTML_Tune
data.each do |dob|
unless dob.is=='code'
if dob.obj =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/
- @word_mode=dob.obj.scan(/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)[.,;:!?]?|(?:#{Mx[:gl_o]}\S+?#{Mx[:gl_c]})+|[^#{Mx[:lnk_o]}#{Mx[:lnk_c]}]+/mu)
+ @word_mode=dob.obj.scan(/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)[.,;:!?)\]]?|(?:#{Mx[:gl_o]}\S+?#{Mx[:gl_c]})+|[^#{Mx[:lnk_o]}#{Mx[:lnk_c]}]+/mu)
words=urls(@word_mode)
dob.obj.gsub!(/.+/m,words)
end #consider change, do a while loop