diff options
| author | John MacFarlane <[email protected]> | 2022-01-03 10:32:57 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-01-03 10:32:57 -0800 |
| commit | cdfdfae4dd06c62631cbaf7c0fc6eefa7545a30b (patch) | |
| tree | 9c4e9289c7bfbcc789d906610455fd9d5cfc9c35 /src | |
| parent | 0abfe4fdabfd372736e8a04a3b6e2a491684e4e3 (diff) | |
parseFormatSpec: cleaner error message for invalid extensions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Extensions.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Extensions.hs b/src/Text/Pandoc/Extensions.hs index 3b2f2ae0b..4da0df278 100644 --- a/src/Text/Pandoc/Extensions.hs +++ b/src/Text/Pandoc/Extensions.hs @@ -624,8 +624,8 @@ parseFormatSpec = parse formatSpec "" Just n -> return n Nothing | name == "lhs" -> return Ext_literate_haskell - | otherwise -> Prelude.fail $ - "Unknown extension: " ++ name + | otherwise -> unexpected $ + "unknown extension: " ++ name return $ \(extsToEnable, extsToDisable) -> case polarity of '+' -> (ext : extsToEnable, extsToDisable) |
