lib/dokkit/resource/extensions/url.rb in dokkit-0.4.4 vs lib/dokkit/resource/extensions/url.rb in dokkit-0.5.0

- old
+ new

@@ -11,10 +11,10 @@ module Extension module Url def relative(href) thr = href if thr.is_a?(String) && href[0,1] == '/' - dtfn = File.dirname(source_fn[/^#{configuration[:document_dir]}\/(.*)/,1]) + '/' + dtfn = File.dirname(source_fn[/^#{env_configuration[:document_dir]}\/(.*)/,1]) + '/' count = dtfn == './' ? 0 : dtfn.split('/').length thr = ('../' * count) + href[1..href.length] end thr end