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
100 result << '/' if result != '.'100 result << '/' if result != '.'
101 end101 end
102 else102 else
103 dest_dir.parent.relative_path_from(base_dir).join(::File.basename(dest)).to_s103 dest_dir.parent.relative_path_from(base_dir).join(dest.split('/').last).to_s
104 end104 end
105 end105 end
106 106