From b93fb15aee8ce1fa1a97cdc8b542bfe52cd5b83d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 9 Oct 2007 12:18:34 +0100 Subject: 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 --- lib/sisu/v0/dal_syntax.rb | 3 +++ 1 file changed, 3 insertions(+) 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!(//,'<:\1>') #escaped special character line.gsub!(/\\~/,'~') #escaped special character -- cgit v1.2.3