aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-31 15:40:02 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-31 15:40:02 +0100
commitc54fc5e3e12125b2f0ffc2cdbca6174eb46d6621 (patch)
tree74955bc7f566fc0df4ae38793248910583451107 /lib
parentsisu 0.56.0 + md5s (diff)
endnote,url regex matching, refinement - still a limitation in mixed use of shortcut
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/dal_syntax.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb
index 4fb0f5d3..23067ea6 100644
--- a/lib/sisu/v0/dal_syntax.rb
+++ b/lib/sisu/v0/dal_syntax.rb
@@ -236,8 +236,9 @@ module Syntax
line.gsub!(/\\\!/,'&#033;') #escaped special character
line.gsub!(/(?:^| )\*~([a-z0-9._-]+)/i,' <:name#\1>') #html name marker <a name="\\1"></a>
line.gsub!(/^([56]~)(\S+)(.+)/,'\1\2 \3 <:name#\2>') #html name marker <a name="\\1"></a>, however at present takes you to correct position within sub-toc, will nneed to clean from sub-toc leaving in main body only
+ ##reversed, watch
+ line.gsub!(/(^| )\{~\^ (.+?)\s*\}((?:https?|ftp):\S+?)([;,.]?(?=\s[^~]|$))/,'\1{ \2 }\3\4 ~{ \3 }~ ') #text url endnote url shortcut {~^ [text] }http://url is { [text] }http://url ~{ http://url }~ [plus adjustment for commas] #means for this class, non-object, un-numbered ~# will not work # shortcut should not be used in conjunction with rebgular matches
line.gsub!(/(^| )\{~\^ (.+?)\s*\}((?:https?|ftp):\S+)\s+~\{(.+?)\}~/,'\1{ \2 }\3 ~{ \3 \4 }~') # watch
- line.gsub!(/(^| )\{~\^ (.+?)\s*\}((?:https?|ftp):\S+?)(,?)?(?:\s|$)/,'\1{ \2 }\3\4 ~{ \3 }~ ') #text url endnote url shortcut {~^ [text] }http://url is { [text] }http://url ~{ http://url }~ [plus adjustment for commas]
line.gsub!(/<:?br>/,'<br />') #xml requires
# depreciated -->
line.gsub!(/(^|\s+|['"]|&nbsp;|[\(\[\{]|\>)e\{(.+?)\}e/,'\1<b>\2</b>') #emphasis