packages feed

skylighting-format-blaze-html 0.1.1.3 → 0.1.2

raw patch · 3 files changed

+13/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

changelog.md view
@@ -1,5 +1,11 @@ # Changelog for skylighting-format-blaze-html +## 0.1.2++  * Include container classes on inline code. In block code,+    these are put on the pre, but in inline code there is only a+    code element; they should not just be dropped. See jgm/pandoc#11423.+ ## 0.1.1.3    * Use `-webkit-text-size-adjust` instead of unsetting
skylighting-format-blaze-html.cabal view
@@ -1,5 +1,5 @@ name:                skylighting-format-blaze-html-version:             0.1.1.3+version:             0.1.2 synopsis:            HTML formatter for skylighting syntax highlighting library description:         This module allows tokens produced by skylighting-core                      to be rendered as HTML.
src/Skylighting/Format/HTML.hs view
@@ -10,6 +10,7 @@ import Data.List (intersperse, sort) import qualified Data.Map as Map import qualified Data.Text as Text+import Data.Containers.ListUtils (nubOrd) import Skylighting.Types import Text.Blaze.Html import qualified Text.Blaze.Html5 as H@@ -54,7 +55,8 @@ -- 'WarningTok'        = @wa@. -- A 'NormalTok' is not marked up at all. formatHtmlInline :: FormatOptions -> [SourceLine] -> Html-formatHtmlInline opts = wrapCode opts+formatHtmlInline opts = wrapCode opts{ codeClasses = nubOrd $ codeClasses opts +++                                                     containerClasses opts }                       . mconcat . intersperse (toHtml "\n")                       . map (mapM_ (tokenToHtml opts)) @@ -90,8 +92,9 @@  wrapCode :: FormatOptions -> Html -> Html wrapCode opts h = H.code ! A.class_ (toValue $ Text.unwords-                                             $ Text.pack "sourceCode"-                                               : codeClasses opts)+                                               (Text.pack "sourceCode"+                                                 : filter (/= Text.pack "sourceCode")+                                                   (codeClasses opts)))                          !? (startZero /= 0, A.style (toValue counterOverride))                          $ h   where  counterOverride = "counter-reset: source-line " <> show startZero <> ";"