-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression: path to --pdf-engine works again #4682
Conversation
src/Text/Pandoc/App.hs
Outdated
@@ -155,7 +155,7 @@ pdfWriterAndProg mWriter mEngine = do | |||
where | |||
go Nothing Nothing = Right ("latex", "pdflatex") | |||
go (Just writer) Nothing = (writer,) <$> engineForWriter writer | |||
go Nothing (Just engine) = (,engine) <$> writerForEngine engine | |||
go Nothing (Just engine) = (,engine) <$> writerForEngine (takeBaseName engine) | |||
go (Just writer) (Just engine) = | |||
case find (== (baseWriterName writer, engine)) engines of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need
find (== (baseWriterName writer, takeBaseName engine)) engines
here, right? For the case where they specify the writer format explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I updated the pull...
I also noticed that makePDF (in Text.Pandoc.PDF) pattern matches
on the engine passed in. So, if an engine with a full path
is passed in, it won't match. This probably needs to be fixed
too. (You wouldn't notice it for latex, since the fallthrough
case does take the base name, but you should see an issue with
wkhtmltopdf or another program if a full path is specified.)
|
Indeed, I tested only with |
Thanks. Some nice types would probably make this more solid, but this is good for now! |
fixes #4681