aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/dal_syntax.rb2
-rw-r--r--lib/sisu/v3/param.rb3
-rw-r--r--lib/sisu/v3/sisupod_make.rb5
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb
index 3a943b75..e51316ed 100644
--- a/lib/sisu/v3/dal_syntax.rb
+++ b/lib/sisu/v3/dal_syntax.rb
@@ -342,7 +342,7 @@ module SiSU_Syntax
end
end
dob.obj.gsub!(/<(https?:\/\/\S+?)>/,'< \1 >') #catch problem markup
- dob.obj.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }http://www.jus.uio.no/sisu') #adjustment 2005w30
+ dob.obj.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image')
dob.obj.gsub!(/<!(\S+)!>/,'<:\1>') #escaped special character
dob.obj.gsub!(/&nbsp;/,"#{Mx[:nbsp]}") #escaped special character
dob.obj.gsub!(/\\~/,"#{Mx[:gl_o]}#126#{Mx[:gl_c]}") #escaped special character
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index ef8e9389..045fd767 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -966,7 +966,7 @@ module SiSU_Param
@lang_code_insert=(@opt.dir_structure_by =~/language/) \
? ''
: ".#{@opt.lng}"
- @rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
+ @rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m
@rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/
@rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg
begin
@@ -1272,6 +1272,7 @@ module SiSU_Param
end
end
end
+ para.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image') # embedded symbol (image)
if para !~/^%+\s/ \
and para =~@rgx_image
@ec[:image] << para.scan(@rgx_image).uniq
diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb
index b154bc1d..e4423641 100644
--- a/lib/sisu/v3/sisupod_make.rb
+++ b/lib/sisu/v3/sisupod_make.rb
@@ -160,8 +160,8 @@ module SiSU_Doc
end
@skin
end
- def images_extract(f,images)
- rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
+ def images_extract(f,images) # consider using param info
+ rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m
if f !~/^%+\s/ \
and f =~rgx_image
images << f.scan(rgx_image).uniq
@@ -183,6 +183,7 @@ module SiSU_Doc
file_array.each do |f| #% work area
if f !~/^%+\s/
skin << f.scan(@rgx_skin).uniq.flatten if f =~@rgx_skin
+ f.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image') # embedded symbol (image)
if f !~/^%+\s/ \
and f =~@rgx_image
images=images_extract(f,images)