Code cleanup in Text/Pandoc/Highlighting.hs.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1340 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2008-07-31 06:35:58 +00:00
parent 2751608d9b
commit 14fd553fe1

View file

@ -47,10 +47,10 @@ highlightHtml (_, classes, keyvals) rawCode =
Just _ -> [OptNumberLines]
lcLanguages = map (map toLower) languages
in case find (\c -> (map toLower c) `elem` lcLanguages) classes of
Nothing -> Left "Unknown or unsupported language"
Just lang -> case highlightAs lang rawCode of
Left err -> Left err
Right hl -> Right $ formatAsXHtml fmtOpts lang hl
Nothing -> Left "Unknown or unsupported language"
Just language -> case highlightAs language rawCode of
Left err -> Left err
Right hl -> Right $ formatAsXHtml fmtOpts language hl
#else
defaultHighlightingCss :: String