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:
parent
2751608d9b
commit
14fd553fe1
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue