aboutsummaryrefslogtreecommitdiff
path: root/pandoc-server
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2022-10-08 23:01:27 +0200
committerJohn MacFarlane <[email protected]>2022-10-08 16:05:48 -0700
commit5589b1f8f994dd4f741e6861fc2a374f609bb2db (patch)
tree2123bebba2b32c66e55070f8eb141221a7480611 /pandoc-server
parenta4218b9719c77978e1968065a3c2c4f25d3c4137 (diff)
[API Change] Change argument type of `getReader`, `getWriter`.
The functions now take a `FlavoredFormat` instead of a text argument.
Diffstat (limited to 'pandoc-server')
-rw-r--r--pandoc-server/src/Text/Pandoc/Server.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/pandoc-server/src/Text/Pandoc/Server.hs b/pandoc-server/src/Text/Pandoc/Server.hs
index 2f43a8561..1c66a66db 100644
--- a/pandoc-server/src/Text/Pandoc/Server.hs
+++ b/pandoc-server/src/Text/Pandoc/Server.hs
@@ -264,13 +264,13 @@ server = convertBytes
modifyPureState $ \st -> st{ stFiles = filetree }
let opts = options params
- let readerFormat = fromMaybe "markdown" $ optFrom opts
- let writerFormat = fromMaybe "html" $ optTo opts
+ readerFormat <- parseFlavoredFormat <$> fromMaybe "markdown" $ optFrom opts
+ writerFormat <- parseFlavoredFormat <$> fromMaybe "html" $ optTo opts
(readerSpec, readerExts) <- getReader readerFormat
(writerSpec, writerExts) <- getWriter writerFormat
let isStandalone = optStandalone opts
- toformat <- formatName <$> parseFlavoredFormat writerFormat
+ let toformat = formatName writerFormat
hlStyle <- traverse (lookupHighlightingStyle . T.unpack)
$ optHighlightStyle opts