diff options
Diffstat (limited to 'lib/sisu/v0/sisupod_make.rb')
-rw-r--r-- | lib/sisu/v0/sisupod_make.rb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/sisu/v0/sisupod_make.rb b/lib/sisu/v0/sisupod_make.rb index 392aee7d..277358c4 100644 --- a/lib/sisu/v0/sisupod_make.rb +++ b/lib/sisu/v0/sisupod_make.rb @@ -158,7 +158,7 @@ module SiSU_Doc end def sisupod_build #see also sisupod in sysenv @rgx_rb_image=/["'](\S+?\.(?:png|jpg|gif))["']/ - @rgx_image=/\{\s*(\S+?\.(?:png|jpg|gif))/ + @rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/ @rgx_skin=/^(?:@skin:|0~skin)\s+(\S+)/ @rgx_doc_import=/^%\s\s*\|(\S+?\.ss[ti])\|@\|\^\|>>ok/ use_file=if @opt.fns =~/(?:\.ssm|\.ssm\.sst)$/; "#{@env.path.composite_file}/#{@opt.fnb}.ssm.sst" @@ -170,12 +170,14 @@ module SiSU_Doc if f !~/^%\s/ skin << f.scan(@rgx_skin).uniq.flatten if f =~@rgx_skin images << f.scan(@rgx_image).uniq if f =~@rgx_image - elsif f =~/^%\s/ and @opt.fns =~/\.ssm\.sst$/ + elsif f =~/^%\s/ \ + and @opt.fns =~/\.ssm\.sst$/ doc_import << f.scan(@rgx_doc_import).uniq if f =~@rgx_doc_import end end docskin=nil - if skin and skin.length > 0 + if skin \ + and skin.length > 0 docskin=skin.pop.flatten.join skin_source=select(docskin) else @@ -187,8 +189,10 @@ module SiSU_Doc docskin=[docskin_with_path.gsub(/.+?\/(skin_\S+?)\.rb/,'\1')] docskin='skin_sisupod' end - if skin_source and docskin #imperfect, revisit - unless skin_source[:name].nil? or skin_source[:name].empty? + if skin_source \ + and docskin #imperfect, revisit + unless skin_source[:name].nil? \ + or skin_source[:name].empty? cp_r(skin_source[:name],"#{docskin_place}/#{docskin}.rb") skinfile_array=IO.readlines(skin_source[:name],'') para_images=[] @@ -202,7 +206,8 @@ module SiSU_Doc end #1. mapping in doc dir? #2. need images used by skin, scan skin?? - if images and images.length > 1 + if images \ + and images.length > 1 images.flatten!.uniq! image_path_pwd='_sisu/image' path_pod_conf="#{@env.path.processing}/sisupod/_sisu" @@ -228,12 +233,14 @@ module SiSU_Doc end end x=@env.document_language_versions_found #check multiple document language versions (param not used) - if doc_import.flatten.length > 0 and @opt.fns =~/\.ssm\.sst$/ + if doc_import.flatten.length > 0 \ + and @opt.fns =~/\.ssm\.sst$/ doc_import.flatten.each do |f| cp_r("#{@env.path.pwd}/#{f}","#{@env.path.processing}/sisupod/#{f}") end end - if x[:f] and x[:f].length > 1 #store multiple document language versions, sisupod + if x[:f] \ + and x[:f].length > 1 #store multiple document language versions, sisupod x[:f].each do |f| cp_r("#{@env.path.pwd}/#{f}","#{@env.path.processing}/sisupod/#{f}") end |