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:
parent
fa50da3030
commit
92ccb88cb7
1 changed files with 10 additions and 1 deletions
|
@ -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 _ ->
|
||||
|
|
Loading…
Reference in a new issue