aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-09 12:18:34 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-09 12:18:34 +0100
commitb93fb15aee8ce1fa1a97cdc8b542bfe52cd5b83d (patch)
treeec27620bced52971286078ef066224e4cb3e28aa /lib
parentcommand line processing shortcuts changed (diff)
dal_syntax, relative links changed to absolute, may wish to reconsider
relative links primarily of interest for html output, for which may wish to retain
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/dal_syntax.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb
index bf83c8ef..a0dfc405 100644
--- a/lib/sisu/v0/dal_syntax.rb
+++ b/lib/sisu/v0/dal_syntax.rb
@@ -65,6 +65,8 @@ module Syntax
@data,@md=data,md
@vz=SiSU_Env::Get_init.instance.skin
@data_new=[]
+ url_and_stub=SiSU_Env::Info_env.new.url
+ @output_url="#{url_and_stub.remote}"
@http_m='\{.+?\}(?:https?|file)://\S+|(?:https?|file):\S+|\.\.\/\S+|\S+?\.png\b|[*]~\S+|^0~.+|<:(?:code|group|alt|verse)(?:-end)?>|<:br>'
@manmkp_ital='[i/]\\{.+?\\}[i/]'
tail_m_ital=%q{(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$)}
@@ -213,6 +215,7 @@ module Syntax
line.gsub!(/^(1~\??) @title\s*$/,"\\1 #{@md.title} - #{@md.subtitle}") #
line.gsub!(/^([23]~\??) (?:(by\s+)?(?:@creator|@author))\s*$/,"\\1 \\2#{@md.dc_creator}") #
line.gsub!(/<((?:https?|file):\/\/\S+?)>/,'< \1 >') #catch problem markup
+ line.gsub!(/\}\.\.\/(\S+)/,"\}#@output_url/\\1") #means you are not supporting relative links (only relevant in html), converted to static here
line.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }http://www.jus.uio.no/sisu') #adjustment 2005w30
line.gsub!(/<!(\S+)!>/,'<:\1>') #escaped special character
line.gsub!(/\\~/,'&#126;') #escaped special character