packages feed

skylighting-format-context 0.1.0.1 → 0.1.0.2

raw patch · 2 files changed

+7/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

skylighting-format-context.cabal view
@@ -1,6 +1,6 @@ cabal-version:       >=1.10 name:                skylighting-format-context-version:             0.1.0.1+version:             0.1.0.2 synopsis:            ConTeXt formatter for skylighting syntax highlighting                      library description:         This module allows tokens produced by skylighting-core
src/Skylighting/Format/ConTeXt.hs view
@@ -40,7 +40,12 @@ tokenToConTeXt (NormalTok, txt)   | Text.all isSpace txt = escapeConTeXt txt tokenToConTeXt (toktype, txt)   = "/BTEX\\" <>-  (Text.pack (show toktype) <> "{" <> escapeConTeXt txt <> "}/ETEX")+  (Text.pack (show toktype) <> "{" <> fixSpaces (escapeConTeXt txt) <> "}/ETEX")+ where+  -- Always place the second of two consecutive spaces in a group. The+  -- ConTeXt parser would otherwise collapse all spaces into a single+  -- space.+  fixSpaces = Text.replace "  " " { }"  escapeConTeXt :: Text -> Text escapeConTeXt = Text.concatMap escapeConTeXtChar