aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-01-03 10:26:18 -0800
committerJohn MacFarlane <[email protected]>2022-01-03 10:26:18 -0800
commit0abfe4fdabfd372736e8a04a3b6e2a491684e4e3 (patch)
treeb5c9af8be8ef409e80c203e45d9bf4d8c8164865
parent75c5218d4ffcd7aabbb8bc62d5e1b4d12332b8aa (diff)
Minor code improvement.
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index 243f7fe17..f0dee64bc 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -842,11 +842,8 @@ options =
case arg of
Nothing -> extensionsFromList extList
Just fmt -> getAllExtensions $ T.pack fmt
- let defExts =
- case arg of
- Nothing -> getDefaultExtensions
- "markdown"
- Just fmt -> getDefaultExtensions $ T.pack fmt
+ let formatName = maybe "markdown" T.pack arg
+ let defExts = getDefaultExtensions formatName
let showExt x =
(if extensionEnabled x defExts
then '+'