@@ -40,9 +40,11 @@ import Data.Char (toLower)
4040highlightHtml :: Bool -- ^ True if inline HTML
4141 -> Attr -- ^ Attributes of the Code or CodeBlock
4242 -> String -- ^ Raw contents of the Code or CodeBlock
43− -> Either String Html -- ^ An error or the formatted Html
44−highlightHtml inline (_, classes, keyvals) rawCode =
45− let firstNum = read $ fromMaybe "1" $ lookup "startFrom" keyvals
43+ -> Either String Html -- ^ An error or the formatted Html
44+highlightHtml inline (id', classes, keyvals) rawCode =
45+ let firstNum = case reads (fromMaybe "1" $ lookup "startFrom" keyvals) of
46+ ((n,_):_) -> n
47+ [] -> 1
4648 fmtOpts = [OptNumberFrom firstNum] ++
4749 [OptInline | inline] ++
4850 case find (`elem` ["number","numberLines","number-lines"]) classes of