aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-22 10:20:27 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-22 10:20:27 +0100
commit566a186fbe168cc86c63e23622b31897145e6574 (patch)
tree6de454076018563e74e02e9b56ced646cf0d0e3f
parentchangelog update to reflect recent changes (diff)
refinement to underscore match for single word in dal
-rw-r--r--lib/sisu/v0/dal_syntax.rb2
1 files changed, 1 insertions, 1 deletions
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+|['"]|&nbsp;|\(|\>)\*(\S+?)\*/,'\1<b>\2</b>') #bold single word, watch
line.gsub!(/(^|\s+|['"]|&nbsp;|\(|\>)\!(\S+?)\!/,'\1<b>\2</b>') #bold single word, watch
line.gsub!(/(^|\s+|['"]|&nbsp;|\(|\>)\/([\(\)a-zA-Z0-9']+?)\/([^a-zA-Z0-9]|[ ,.;:'"~$]|$)/,'\1<i>\2</i>\3') #italics single word, watch
- line.gsub!(/(^|\s+|['"]|&nbsp;|\(|\>)_(\S+?)_([\s.,!?'")]|$)/,'\1<u>\2</u>\3') #underscore single word, watch
+ line.gsub!(/(^|\s+|['"]|&nbsp;|\(|\>)_(\S+?)_([.,!'")]?(?:\s|$))/,'\1<u>\2</u>\3') #underscore single word, watch (made more complicated by url decoration escape tag (_url))
line.gsub!(/(^|\s+)-([^{]\S+?)-( |$)/,'\1<del>\2</del>\3') #underscore single word, watch
line.gsub!(/(^|\s+|['"]|&nbsp;|\(|\>|\d+)\^(\S+?)\^/,'\1<sup>\2</sup>') #superscript single word, watch digit added
line.gsub!(/<[:e]\s+(.+?)!?>/,'~{ \1 }~') # not tested