From 566a186fbe168cc86c63e23622b31897145e6574 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 22 Jul 2007 10:20:27 +0100 Subject: refinement to underscore match for single word in dal --- lib/sisu/v0/dal_syntax.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb index 8fc85b87..ce5fdc72 100644 --- a/lib/sisu/v0/dal_syntax.rb +++ b/lib/sisu/v0/dal_syntax.rb @@ -262,7 +262,7 @@ module Syntax line.gsub!(/(^|\s+|['"]| |\(|\>)\*(\S+?)\*/,'\1\2') #bold single word, watch line.gsub!(/(^|\s+|['"]| |\(|\>)\!(\S+?)\!/,'\1\2') #bold single word, watch line.gsub!(/(^|\s+|['"]| |\(|\>)\/([\(\)a-zA-Z0-9']+?)\/([^a-zA-Z0-9]|[ ,.;:'"~$]|$)/,'\1\2\3') #italics single word, watch - line.gsub!(/(^|\s+|['"]| |\(|\>)_(\S+?)_([\s.,!?'")]|$)/,'\1\2\3') #underscore single word, watch + line.gsub!(/(^|\s+|['"]| |\(|\>)_(\S+?)_([.,!'")]?(?:\s|$))/,'\1\2\3') #underscore single word, watch (made more complicated by url decoration escape tag (_url)) line.gsub!(/(^|\s+)-([^{]\S+?)-( |$)/,'\1\2\3') #underscore single word, watch line.gsub!(/(^|\s+|['"]| |\(|\>|\d+)\^(\S+?)\^/,'\1\2') #superscript single word, watch digit added line.gsub!(/<[:e]\s+(.+?)!?>/,'~{ \1 }~') # not tested -- cgit v1.2.3