diff options
Diffstat (limited to 'Text')
-rw-r--r-- | Text/Pandoc/Writers/HTML.hs | 25 |
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; |