diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-07-15 19:02:12 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-07-15 19:02:12 -0400 |
commit | 4ef1c3099119cedff245acfe1ef26e5829e5bf62 (patch) | |
tree | 889a72066aaf70267f4209fd22dcf3aa6c8bbaa6 /lib/sisu/v5/utils.rb | |
parent | v5 v6: base images & css, continue (diff) |
v5 v6: document images (more to clean up)sisu_5.5.1
Diffstat (limited to 'lib/sisu/v5/utils.rb')
-rw-r--r-- | lib/sisu/v5/utils.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sisu/v5/utils.rb b/lib/sisu/v5/utils.rb index 7db4143a..4d30d031 100644 --- a/lib/sisu/v5/utils.rb +++ b/lib/sisu/v5/utils.rb @@ -184,6 +184,13 @@ module SiSU_Utils m=/.+\/(?:src\/)?(\S+)/im base_markup[m,1] end + def image_src + if base_markup =~/sisupod\/doc[\/]?$/ + base_markup.gsub(/\/doc[\/]?$/,'/image') + elsif FileTest.directory?("#{base_markup}/_sisu/image") + "#{base_markup}/_sisu/image" + end + end def bmd base_markup end |