aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/dal_syntax.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-23 14:46:08 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-23 14:46:12 -0400
commit07fcd01699e0b67f5a822514d4fcfab4b3c70ff0 (patch)
treecb1e0d777391ab8d7291d2e6b7ad2f1472fc7b7c /lib/sisu/v2/dal_syntax.rb
parentversion date (diff)
internal links, punctuation & parentheses issue, fix
* dal, exclude parentheses and square brackets from matching (requested fix, Ben Armstrong) * html, remove space between link & following punctuation, parentheses &/or square brackets (requested fix, Ben Armstrong) * epub, remove space between link & following punctuation, parentheses &/or square brackets
Diffstat (limited to 'lib/sisu/v2/dal_syntax.rb')
-rw-r--r--lib/sisu/v2/dal_syntax.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb
index c4059fa8..e56d4a26 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,
+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