diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-07-30 09:06:51 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-07-30 09:06:51 +0100 |
commit | a99e0de5885441989c2ae9ae6fad15fd35d0bb97 (patch) | |
tree | c78f7a8ef21b06edd5e69b4396e45edc7b59aeb2 /lib/sisu/v0/dal_syntax.rb | |
parent | using postive lookahead for url matching, test if to change (diff) |
url matching, semi-colon as possible terminator, in dal match https
Diffstat (limited to 'lib/sisu/v0/dal_syntax.rb')
-rw-r--r-- | lib/sisu/v0/dal_syntax.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb index ce5fdc72..4fb0f5d3 100644 --- a/lib/sisu/v0/dal_syntax.rb +++ b/lib/sisu/v0/dal_syntax.rb @@ -65,7 +65,7 @@ module Syntax @data,@md=data,md @vz=SiSU_Env::Get_init.instance.skin @data_new=[] - @http_m='\{.+?\}http://\S+|http:\S+|\.\.\/\S+|\S+?\.png\b|[*]~\S+|^0~.+|<:(?:code|group|alt|verse)(?:-end)?>|<:br>' + @http_m='\{.+?\}https?://\S+|https?:\S+|\.\.\/\S+|\S+?\.png\b|[*]~\S+|^0~.+|<:(?:code|group|alt|verse)(?:-end)?>|<:br>' @manmkp_ital='[i/]\\{.+?\\}[i/]' tail_m_ital=%q{(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$)} tail_m_bold=%q{(?:(?:<\/i>)?(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$))?} @@ -283,8 +283,8 @@ module Syntax else line.gsub!(/(<br \/>)/i,"\\1\n") end else #code blocks - line.gsub!(/(^|\s)(http:\/\/\S+)/,'\1_\2') #line.gsub!(/(^|\s)(http:\/\/\S+)/,"\\1\\\\\\2") #escape urls - line.gsub!(/(^|\s)<(http:\/\/\S+)>([\s,.]|$)/,'\1\2\3') #clean/unescape urls with decoration, re-apply decoration later + line.gsub!(/(^|\s)(https?:\/\/\S+)/,'\1_\2') #line.gsub!(/(^|\s)(http:\/\/\S+)/,"\\1\\\\\\2") #escape urls + line.gsub!(/(^|\s)<(https?:\/\/\S+)>([\s,.]|$)/,'\1\2\3') #clean/unescape urls with decoration, re-apply decoration later line.gsub!(/<:codeline>/,"\n") end line |