History

Replace File.basename in URL#relative_path_to because it doesn't handle special characters in URLs well

nucular committed 10 years ago

Commit 034ecfa1 parent ceccfc02 files · +9 −1Browse files

Showing the changes to lib/docs (1 of 2 files). Show all

Unified · Split

lib/docs/core/url.rb+1−1
@@ -100,7 +100,7 @@ module Docs · 99 unmodified lines
100100 result << '/' if result != '.'
101101 end
102102 else
103− dest_dir.parent.relative_path_from(base_dir).join(::File.basename(dest)).to_s
103+ dest_dir.parent.relative_path_from(base_dir).join(dest.split('/').last).to_s
104104 end
105105 end
106106