mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 19:26:45 +00:00
Don't look for template files remotely for remote input.
Previously pandoc would look for the template at a remote URL when a URL was used for the input file, instead of taking it from the data-dir. Closes #5579.
This commit is contained in:
@@ -165,7 +165,16 @@ optToOutputSettings opts = do
|
||||
"" -> tp <.> format
|
||||
_ -> tp
|
||||
Just . UTF8.toString <$>
|
||||
((fst <$> fetchItem tp') `catchError`
|
||||
((do surl <- stSourceURL <$> getCommonState
|
||||
-- we don't want to look for templates remotely
|
||||
-- unless the full URL is specified:
|
||||
modifyCommonState $ \st -> st{
|
||||
stSourceURL = Nothing }
|
||||
(bs, _) <- fetchItem tp'
|
||||
modifyCommonState $ \st -> st{
|
||||
stSourceURL = surl }
|
||||
return bs)
|
||||
`catchError`
|
||||
(\e ->
|
||||
case e of
|
||||
PandocResourceNotFound _ ->
|
||||
|
||||
Reference in New Issue
Block a user