summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-11-22 07:40:26 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-11-22 07:40:26 -0800
commitbbb3d8d4424b32c65fa8468cffff1e3fbfdb06cb (patch)
treed1f913ff4ac36612b51a8d2036b775aacc3a8fe0 /src
parenta7f6241f508eb78047889c8e7c391d39f99b59ae (diff)
hlint changes
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Highlighting.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Highlighting.hs b/src/Text/Pandoc/Highlighting.hs
index d0b945d45..71927054f 100644
--- a/src/Text/Pandoc/Highlighting.hs
+++ b/src/Text/Pandoc/Highlighting.hs
@@ -65,9 +65,7 @@ highlight :: (FormatOptions -> [SourceLine] -> a) -- ^ Formatter
-> String -- ^ Raw contents of the CodeBlock
-> Maybe a -- ^ Maybe the formatted result
highlight formatter (_, classes, keyvals) rawCode =
- let firstNum = case safeRead (fromMaybe "1" $ lookup "startFrom" keyvals) of
- Just n -> n
- Nothing -> 1
+ let firstNum = fromMaybe 1 (safeRead (fromMaybe "1" $ lookup "startFrom" keyvals))
fmtOpts = defaultFormatOpts{
startNumber = firstNum,
numberLines = any (`elem`