aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/texinfo_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/texinfo_format.rb')
-rw-r--r--lib/sisu/v0/texinfo_format.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v0/texinfo_format.rb b/lib/sisu/v0/texinfo_format.rb
index e4803d87..57bca409 100644
--- a/lib/sisu/v0/texinfo_format.rb
+++ b/lib/sisu/v0/texinfo_format.rb
@@ -330,7 +330,7 @@ WOK
#if @para !~ /^\s*<:image|\}:image\s/
# @para.gsub!(/_/,'\_')
#end
- @para.gsub!(/_(http:\/\/)/,'\1')
+ @para.gsub!(/_(https?:\/\/)/,'\1')
@para.gsub!(/§/i,'\S')
@para.gsub!(/£/i,'\pounds')
@para.gsub!(/å/i,'\aa')
@@ -464,7 +464,7 @@ WOK
width="100"
width=@para[/<:image.+?width=``(\d+)''.+?>/im,1]
width=width.to_i*0.4
- @para.gsub!(/<:image\s+((?:https?|ftp)\S+)\s+(\S+)\s+.+\s+?>/i,
+ @para.gsub!(/<:image\s+((?:https?|file|ftp)\S+)\s+(\S+)\s+.+\s+?>/i,
"\\href{\\1}{\\includegraphics*[width=#{width}pt]{#{dir.path.image_source_tex}/\\2}}")
@para.gsub!(/<:image\s+(\S+)\s+.+\s+?>/i,
"\\includegraphics*[width=#{width}pt]{#{dir.path.image_source_tex}/\\1}")
@@ -478,8 +478,8 @@ WOK
end
def http
# very messy clean up ! - work area, testing
- z=@para[/\\\{(.+?)\}(?:https?|ftp):\/\//,1] # match operator for z \\ fragile !
- url=@para[/((?:https?|ftp):\S+)/im,1]
+ z=@para[/\\\{(.+?)\}(?:https?|file|ftp):\/\//,1] # match operator for z \\ fragile !
+ url=@para[/((?:https?|file|ftp):\S+)/im,1]
if @para =~/\.(png|jpg|gif)/
image,w,x,y=z.scan(/\S+/)
image.gsub!(/\\/,'')
@@ -492,11 +492,11 @@ WOK
end
if image
dir=SiSU_Env::Info_env.new(@md.fns)
- @para.gsub!(/\{\S+\.(png|jpg|gif).+?\}(?:https?|ftp):\/\/\S+/, # fragile match operator\\ fragile !
+ @para.gsub!(/\{\S+\.(png|jpg|gif).+?\}(?:https?|file|ftp):\/\/\S+/, # fragile match operator\\ fragile !
"\n\\href{#{url}}{\\includegraphics*[width=#{width}pt]{#{dir.path.image_source_tex}/#{image}}}#{caption}")
else
link=z[/(.+?)\\/im,1]
- @para.gsub!(/\{.+?\}(?:https?|ftp):\/\/\S+/,"\n\\noindent\\href{#{url}}{#{link}}") # fragile match operator\\ fragile !
+ @para.gsub!(/\{.+?\}(?:https?|file|ftp):\/\/\S+/,"\n\\noindent\\href{#{url}}{#{link}}") # fragile match operator\\ fragile !
end
end
end