From f31e286f4a73c5c0f355512b0cb45c6c82088516 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 22 Jun 2013 01:13:46 -0400 Subject: v5: general code cleaning * propagate back to v4 after testing --- lib/sisu/v5/texinfo_format.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v5/texinfo_format.rb') diff --git a/lib/sisu/v5/texinfo_format.rb b/lib/sisu/v5/texinfo_format.rb index e4efdb3b..2da5d6c4 100644 --- a/lib/sisu/v5/texinfo_format.rb +++ b/lib/sisu/v5/texinfo_format.rb @@ -82,7 +82,6 @@ module SiSU_TexInfoFormat def head t=Time.now year=t.year - filename=%{#{@md.fns}}[/(.+?)\.\w\w\d\d$/,1] title=spec_char(@md.title.full) title=title.gsub(/<(br|p|i)>|<\/\s*(br|p|i)>|<(br|p)\s*\/>/," #{Tex[:backslash]*2} "). gsub(/\$/,"\\$"). @@ -98,7 +97,7 @@ module SiSU_TexInfoFormat author=@md.author if @md.author author ||='' author=author.gsub(/[\*]/,'') #if author - v=SiSU_Env::InfoVersion.instance.get_version + SiSU_Env::InfoVersion.instance.get_version head =</] @dob.obj=@dob.obj.gsub(/\/,'') end end @@ -517,7 +513,7 @@ WOK def png # very messy clean up ! - work area, testing z=@dob[/\\\{(.+?)\}(?:image|png)/,1] # match operator for z \\ fragile ! - image,w,x,y=z.scan(/\S+/) + image=z.scan(/\S+/)[0] #image,w,x,y=z.scan(/\S+/) image=image.gsub(/\\/,'') @dob.obj=@dob.obj.gsub(/\\\{\S+\.(png|jpg|gif).+?\}(image|png)/,"") # fragile match operator\\ fragile ! end @@ -526,7 +522,7 @@ WOK z=@dob[/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,1] # match operator for z \\ fragile ! url=@dob[/((?:https?|file|ftp):\S+)/im,1] if @dob =~/\.(png|jpg|gif)/ - image,w,x,y=z.scan(/\S+/) + image=z.scan(/\S+/)[0] #image,w,x,y=z.scan(/\S+/) image=image.gsub(/\\/,'') width=200 width=z[/w=(\d+)/im,1] if z =~/w=(\d+)/ -- cgit v1.2.3