From 4389746982cb56a43e6e394595e50fa47ac4e64a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 22 Jul 2007 02:45:28 +0100 Subject: dal, matching of underscore so as not to be too greedy --- 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 a882a2c9..8fc85b87 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+?)_/,'\1\2') #underscore single word, watch + line.gsub!(/(^|\s+|['"]| |\(|\>)_(\S+?)_([\s.,!?'")]|$)/,'\1\2\3') #underscore single word, watch 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