Skip to content

Commit

Permalink
Allow '-' in filenames for custom lua writers.
Browse files Browse the repository at this point in the history
Closes #5187.
  • Loading branch information
jgm committed Dec 31, 2018
1 parent 5cd48c8 commit a1ad5bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Text/Pandoc/App/OutputSettings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ optToOutputSettings opts = do
return (formatFromFilePaths "html" [outputFile], Nothing)
Just f -> return (f, Nothing)

let format = map toLower $ baseWriterName
$ takeFileName writerName -- in case path to lua script
let format = if ".lua" `isSuffixOf` writerName
then writerName
else map toLower $ baseWriterName writerName

(writer, writerExts) <-
if ".lua" `isSuffixOf` format
Expand Down

0 comments on commit a1ad5bb

Please sign in to comment.