aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-02-10 18:59:54 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-02-10 18:59:54 +0000
commit9a7ca4d9aa385d24751652f84273672351b10647 (patch)
tree3fc57e6e20e83c42eabc1b63d464a330990fe94b /Text/Pandoc/Writers
parent9c9b41e8c6947886551d56b54886a259140856ae (diff)
downloadpandoc-9a7ca4d9aa385d24751652f84273672351b10647.tar.gz
Minor changes due to changes in highlighting-kate API.
defaultHighlightingCss now imported rather than duplicated. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1235 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Writers')
-rw-r--r--Text/Pandoc/Writers/HTML.hs25
1 files changed, 2 insertions, 23 deletions
diff --git a/Text/Pandoc/Writers/HTML.hs b/Text/Pandoc/Writers/HTML.hs
index 5fbeaaab9..d4ba09293 100644
--- a/Text/Pandoc/Writers/HTML.hs
+++ b/Text/Pandoc/Writers/HTML.hs
@@ -33,7 +33,7 @@ import Text.Pandoc.ASCIIMathML
import Text.Pandoc.CharacterReferences ( decodeCharacterReferences )
import Text.Pandoc.Shared
import Text.Pandoc.Readers.TeXMath
-import Text.Pandoc.Highlighting ( highlightHtml )
+import Text.Pandoc.Highlighting ( highlightHtml, defaultHighlightingCss )
import Numeric ( showHex )
import Data.Char ( ord, toLower, isAlpha )
import Data.List ( isPrefixOf, intersperse, find )
@@ -223,27 +223,6 @@ addToCSS item = do
let current = stCSS st
put $ st {stCSS = S.insert item current}
--- | Generic CSS for syntax highlighting.
-highlightingCSS :: String
-highlightingCSS =
- "pre.sourceCode { }\n\
- \pre.sourceCode span.LineNumber { display: none; }\n\
- \pre.numberLines span.LineNumber { display: inline; color: #AAAAAA; padding-right: 0; border-right: 1px solid #AAAAAA; margin-right: 3px; }\n\
- \pre.sourceCode span.Normal { }\n\
- \pre.sourceCode span.Keyword { color: #007020; font-weight: bold; } \n\
- \pre.sourceCode span.DataType { color: #902000; }\n\
- \pre.sourceCode span.DecVal { color: #40a070; }\n\
- \pre.sourceCode span.BaseN { color: #40a070; }\n\
- \pre.sourceCode span.Float { color: #40a070; }\n\
- \pre.sourceCode span.Char { color: #4070a0; }\n\
- \pre.sourceCode span.String { color: #4070a0; }\n\
- \pre.sourceCode span.Comment { color: #60a0b0; font-style: italic; }\n\
- \pre.sourceCode span.Others { color: #007020; }\n\
- \pre.sourceCode span.Alert { color: red; font-weight: bold; }\n\
- \pre.sourceCode span.Function { color: #06287e; }\n\
- \pre.sourceCode span.RegionMarker { }\n\
- \pre.sourceCode span.Error { color: red; font-weight: bold; }"
-
-- | Convert Pandoc inline list to plain text identifier.
inlineListToIdentifier :: [Inline] -> String
inlineListToIdentifier = dropWhile (not . isAlpha) . inlineListToIdentifier'
@@ -298,7 +277,7 @@ blockToHtml opts (CodeBlock attr@(_,classes,_) rawCode) = do
then []
else [theclass $ unwords classes]) $ thecode <<
(rawCode ++ "\n")
- Right h -> addToCSS highlightingCSS >> return h
+ Right h -> addToCSS defaultHighlightingCss >> return h
blockToHtml opts (BlockQuote blocks) =
-- in S5, treat list in blockquote specially
-- if default is incremental, make it nonincremental;