diff options
| author | John MacFarlane <[email protected]> | 2022-01-03 10:26:18 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-01-03 10:26:18 -0800 |
| commit | 0abfe4fdabfd372736e8a04a3b6e2a491684e4e3 (patch) | |
| tree | b5c9af8be8ef409e80c203e45d9bf4d8c8164865 /src | |
| parent | 75c5218d4ffcd7aabbb8bc62d5e1b4d12332b8aa (diff) | |
Minor code improvement.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/App/CommandLineOptions.hs | 7 |
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 '+' |
