Fixed --filter
so it doesn't search PATH for a filter with a path.
This fixed a bug wherein `--filter ./caps.py` would run `caps.py` from the system path, even if there was a `caps.py` in the working directory.
This commit is contained in:
parent
b2127311cb
commit
b1a8f1fa1a
1 changed files with 3 additions and 1 deletions
|
@ -96,7 +96,9 @@ isTextFormat s = takeWhile (`notElem` "+-") s `notElem` ["odt","docx","epub","ep
|
|||
|
||||
externalFilter :: FilePath -> [String] -> Pandoc -> IO Pandoc
|
||||
externalFilter f args' d = do
|
||||
mbexe <- findExecutable f
|
||||
mbexe <- if '/' `elem` f -- don't check PATH if filter name it has a path
|
||||
then return Nothing
|
||||
else findExecutable f
|
||||
(f', args'') <- case mbexe of
|
||||
Just x -> return (x, args')
|
||||
Nothing -> do
|
||||
|
|
Loading…
Reference in a new issue