git.iko.soy/typeable/pandoc
on master help sign in
Fixed --self-contained with Windows paths.

Previously C:\foo.js was being wrongly interpreted as a URI. Closes #1558.

commit2956ef251c815c332679ff4666031a5b7a65aadc authorJohn MacFarlane <jgm@berkeley.edu> dateFri 22 Aug 2014, 23:21 (12 years ago) parent17f7100
1 file changed+2−1
src/Text/Pandoc/Shared.hs+2−1
src/Text/Pandoc/Shared.hs+2−1
@@ -796,7 +796,8 @@ fetchItem sourceURL s =
796796 mime = case takeExtension fp of
797797 ".gz" -> getMimeType $ dropExtension fp
798798 x -> getMimeType x
799− ensureEscaped = escapeURIString isAllowedInURI
799+ ensureEscaped x@(_:':':'\\':_) = x -- likely windows path
800+ ensureEscaped x = escapeURIString isAllowedInURI x
800801
801802-- | Like 'fetchItem', but also looks for items in a 'MediaBag'.
802803fetchItem' :: MediaBag -> Maybe String -> String