lib/awestruct/extensions/relative.rb in awestruct-0.5.6.beta8 vs lib/awestruct/extensions/relative.rb in awestruct-0.5.6.beta9

- old
+ new

@@ -9,10 +9,12 @@ begin # Ignore absolute links if href.start_with?("http://") || href.start_with?("https://") result = href else - result = Pathname.new(href).relative_path_from(Pathname.new(File.dirname(p.output_path))).to_s + pathname = Pathname.new(href).relative_path_from(Pathname.new(File.dirname(p.output_path))) + result = pathname.to_s + result << '/' if pathname.extname.empty? end result rescue Exception => e ExceptionHelper.log_building_error e, p.relative_source_path end