aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-20 14:53:32 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-20 14:53:32 +0100
commit6d205e38740a8a7dff708f677632a2819d59eb64 (patch)
treec5ac0b88816eb98448ad6e823c5418508be3618c /lib
parentdebian/control Replaces and Conflicts placed on sisu-doc sub-package (0.59 ve... (diff)
parentdal todo with path to shared source; shared xml cosmetic (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/dal.rb27
-rw-r--r--lib/sisu/v0/shared_xml.rb9
2 files changed, 24 insertions, 12 deletions
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index 47d3750d..5b21b33d 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -400,9 +400,13 @@ module SiSU_DAL
else nil
end
if describe
- tuned_file_tmp << if @output_url #to double space <:br> at beginning of entry
- "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.remote}/#{url_dir}/#{o_f}"
- else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
+ tuned_file_tmp << if @u.remote #to double space <:br> at beginning of entry
+ "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }#{@u.remote}/#{url_dir}/#{o_f} "
+ else
+ if describe =~/^~\^ /
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }../#{url_dir}/#{o_f} "
+ else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f} "
+ end
end
end
end
@@ -413,16 +417,21 @@ module SiSU_DAL
else nil
end
if describe
- tuned_file_tmp << if @output_url
- x=if describe =~/\.zip/
- "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_pod}/#{o_f}"
- else "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_txt}/#{o_f}"
+ tuned_file_tmp << if @u.remote
+ x=if describe =~/zip/
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_pod}/#{o_f} "
+ else "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_txt}/#{o_f} "
+ end
+ else
+ x=if describe =~/zip/
+ "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../pod/#{o_f} "
+ else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../zip/#{o_f} "
end
- else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
end
end
end
- tuned_file << 'group{' << tuned_file_tmp.join("\n").strip << '}group'
+ tuned_file << 'group{' << tuned_file_tmp.join("\n") << '}group'
+ #tuned_file << 'group{' << tuned_file_tmp.join("\n").strip << '}group'
tuned_file_tmp=[]
else tuned_file << para
end
diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb
index 5d427782..4e604e9c 100644
--- a/lib/sisu/v0/shared_xml.rb
+++ b/lib/sisu/v0/shared_xml.rb
@@ -355,13 +355,16 @@ module SiSU_XML_munge
para.gsub!(/<0;\w\d+;[um]\d+><#@dp:#@dp>/,'')
if para !~/^<:code>/
#embeds a red-bullet image -->
- para.gsub!(/(?:^|[^_\\])\{\s*(\S+?\.(?:jpg|png|gif))\s+(\d+)x(\d+)(\s+[^}]+)?\}(https?:\/\/\S+)/,%{<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\1" width="\\2" height="\\3" />[\\1] \\4})
- para.gsub!(/(?:^|[^_\\])\{\s*(\S+?\.(?:jpg|png|gif))(\s+[^}]+)?\}(https?:\/\/\S+)/,%{<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\1"/>\\1})
+ para.gsub!(/(?:^|[^_\\])\{\s*(\S+?\.(?:jpg|png|gif))\s+(\d+)x(\d+)(\s+[^}]+)?\}(https?:\/\/\S+)/,
+ %{<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\1" width="\\2" height="\\3" />[\\1] \\4})
+ para.gsub!(/(?:^|[^_\\])\{\s*(\S+?\.(?:jpg|png|gif))(\s+[^}]+)?\}(https?:\/\/\S+)/,
+ %{<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\1"/>\\1})
para.gsub!(/(^|\s)\{([^}]+)\}(https?:\/\/[^"><]+?)([,.:;"><]?(?=\s|$))/,
'\1<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\3">\2</link>\4') #watch, compare html_tune
para.gsub!(/(^|\s)((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/,
%{\\1#{@url_brace.xml_open}<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\\2">\\2</link>#{@url_brace.xml_close}\\3})
- para.gsub!(/\b[_\\]((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,'<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\1">\1</link>\2') #escaped urls not linked, deal with later
+ para.gsub!(/\b[_\\]((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/,
+ '<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\1">\1</link>\2') #escaped urls not linked, deal with later
para.gsub!(/&nbsp;/,'&#160;')
#para.gsub!(/&nbsp;/,' ') #clean
else