diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-11-21 04:40:59 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-11-21 04:40:59 +0000 |
commit | 39f6af5de4f4059239fbeda4095d8f92b98912d3 (patch) | |
tree | 346e64bf4ec4e35e797f231e40fe2da53e374e92 /src/Text/Pandoc/Highlighting.hs | |
parent | 9d20eeb019a6c5208342bfc3f03ae47c9aa83483 (diff) |
Modified html+lhs output to use 'haskell' highlighter.
The bird tracks are added in the highlighting module.
This makes sense, because the kate's haskell highlighter
is much better than the literateHaskell highlighter.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1620 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Highlighting.hs')
-rw-r--r-- | src/Text/Pandoc/Highlighting.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Highlighting.hs b/src/Text/Pandoc/Highlighting.hs index 6a88e5d70..457e605a5 100644 --- a/src/Text/Pandoc/Highlighting.hs +++ b/src/Text/Pandoc/Highlighting.hs @@ -45,12 +45,16 @@ highlightHtml (_, classes, keyvals) rawCode = case find (`elem` ["number","numberLines","number-lines"]) classes of Nothing -> [] Just _ -> [OptNumberLines] + addBirdTracks = "literate" `elem` classes lcLanguages = map (map toLower) languages in case find (\c -> (map toLower c) `elem` lcLanguages) classes of Nothing -> Left "Unknown or unsupported language" Just language -> case highlightAs language rawCode of Left err -> Left err - Right hl -> Right $ formatAsXHtml fmtOpts language hl + Right hl -> Right $ formatAsXHtml fmtOpts language $ + if addBirdTracks + then map ((["Special"],"> "):) hl + else hl #else defaultHighlightingCss :: String |