diff options
-rw-r--r-- | pandoc.cabal | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Highlighting.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 6 | ||||
m--------- | templates | 12 | ||||
-rw-r--r-- | tests/lhs-test.html | 5 | ||||
-rw-r--r-- | tests/lhs-test.html+lhs | 5 |
6 files changed, 19 insertions, 15 deletions
diff --git a/pandoc.cabal b/pandoc.cabal index fda7ee457..b12594a95 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -215,7 +215,7 @@ Library tagsoup >= 0.12.5 && < 0.13, base64-bytestring >= 0.1 && < 0.2, zlib >= 0.5 && <= 0.6, - highlighting-kate >= 0.4 && < 0.5, + highlighting-kate >= 0.5 && < 0.6, temporary >= 1.1 && < 1.2 if impl(ghc >= 6.10) Build-depends: base >= 4 && < 5, syb >= 0.1 && < 0.4 @@ -306,7 +306,7 @@ Executable pandoc tagsoup >= 0.12.5 && < 0.13, base64-bytestring >= 0.1 && < 0.2, zlib >= 0.5 && <= 0.6, - highlighting-kate >= 0.4 && < 0.5, + highlighting-kate >= 0.5 && < 0.6, temporary >= 1.1 && < 1.2 if impl(ghc >= 6.10) Build-depends: base >= 4 && < 5, syb >= 0.1 && < 0.4 diff --git a/src/Text/Pandoc/Highlighting.hs b/src/Text/Pandoc/Highlighting.hs index a40bab66a..4fb799cf1 100644 --- a/src/Text/Pandoc/Highlighting.hs +++ b/src/Text/Pandoc/Highlighting.hs @@ -36,7 +36,7 @@ module Text.Pandoc.Highlighting ( languages , styleToLaTeX , formatHtmlInline , formatHtmlBlock - , styleToHtml + , styleToCss , pygments , espresso , tango diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 9953cc7b7..99aa8653c 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -37,7 +37,7 @@ import Text.Pandoc.Templates import Text.Pandoc.Generic import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Slides -import Text.Pandoc.Highlighting ( highlight, styleToHtml, +import Text.Pandoc.Highlighting ( highlight, styleToCss, formatHtmlInline, formatHtmlBlock ) import Text.Pandoc.XML (stripTags, escapeStringForXML) import Network.HTTP ( urlEncode ) @@ -153,8 +153,8 @@ pandocToHtml opts (Pandoc (Meta title' authors' date') blocks) = do ("/*<![CDATA[*/\n" ++ s ++ "/*]]>*/\n") Nothing -> mempty else mempty - let newvars = [("highlighting-css", renderHtml $ styleToHtml - $ writerHighlightStyle opts) | + let newvars = [("highlighting-css", + styleToCss $ writerHighlightStyle opts) | stHighlighting st] ++ [("math", renderHtml math) | stMath st] return (tit, auths, authsMeta, date, toc, thebody, newvars) diff --git a/templates b/templates -Subproject 83f2fdd9e27935430ef9146a337599f78ba3e3d +Subproject dc936548c2b07617a799611b0968b503614be9f diff --git a/tests/lhs-test.html b/tests/lhs-test.html index 291c374f3..06290736c 100644 --- a/tests/lhs-test.html +++ b/tests/lhs-test.html @@ -5,7 +5,8 @@ <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="generator" content="pandoc" /> <title></title> -<style type="text/css">table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { + <style type="text/css"> +table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { margin: 0; padding: 0; vertical-align: baseline; border: none; } table.sourceCode { } td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; } @@ -22,7 +23,7 @@ code > span.ot { color: #007020; } code > span.al { color: #ff0000; font-weight: bold; } code > span.fu { color: #06287e; } code > span.er { color: #ff0000; font-weight: bold; } -</style> + </style> </head> <body> <h1 id="lhs-test">lhs test</h1> diff --git a/tests/lhs-test.html+lhs b/tests/lhs-test.html+lhs index ff0ebfac5..f9f2c68fa 100644 --- a/tests/lhs-test.html+lhs +++ b/tests/lhs-test.html+lhs @@ -5,7 +5,8 @@ <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="generator" content="pandoc" /> <title></title> -<style type="text/css">table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { + <style type="text/css"> +table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { margin: 0; padding: 0; vertical-align: baseline; border: none; } table.sourceCode { } td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; } @@ -22,7 +23,7 @@ code > span.ot { color: #007020; } code > span.al { color: #ff0000; font-weight: bold; } code > span.fu { color: #06287e; } code > span.er { color: #ff0000; font-weight: bold; } -</style> + </style> </head> <body> <h1 id="lhs-test">lhs test</h1> |