From 3542f5bf294f9335d2985621ae136c71849241bd Mon Sep 17 00:00:00 2001 From: nucular Date: Mon, 16 May 2016 03:02:40 +0200 Subject: [PATCH] Replace File.basename in URL#relative_path_to because it doesn't handle special characters in URLs well --- lib/docs/core/url.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/core/url.rb b/lib/docs/core/url.rb index 62b474e1..b2eaf658 100644 --- a/lib/docs/core/url.rb +++ b/lib/docs/core/url.rb @@ -100,7 +100,7 @@ module Docs result << '/' if result != '.' end else - dest_dir.parent.relative_path_from(base_dir).join(::File.basename(dest)).to_s + dest_dir.parent.relative_path_from(base_dir).join(dest.split('/').last).to_s end end