This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- diagram.rb.orig 2015-06-26 22:31:23.000000000 +0900 | |
+++ diagram.rb 2015-06-26 22:31:52.000000000 +0900 | |
@@ -114,7 +114,9 @@ module Asciidoctor | |
target = attributes.delete('target') | |
image_name = "#{target || ('diag-' + source.checksum)}.#{format}" | |
- image_dir = File.expand_path(parent.document.attributes['imagesdir'] || '', parent.document.attributes['outdir'] || parent.document.attributes['docdir']) | |
+ outdir = parent.document.attributes['outdir'] || parent.document.attributes['docdir'] | |
+ imagesdir = lambda {|s| outdir && s.chr == '/' ? s[1,s.length] : s}[(parent.document.attributes['imagesdir'] || '')] | |
+ image_dir = File.expand_path(imagesdir, outdir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you do not have OpenSSL installed, update | |
# the following line to use "http://" instead | |
source 'https://rubygems.org' | |
gem "middleman", "~>3.3.12" | |
# Live-reloading plugin | |
gem "middleman-livereload", "~> 3.1.0" | |
# For faster file watcher updates on Windows: |