packages feed

pandoc-filter-indent 0.3.0.0 → 0.3.1.0

raw patch · 6 files changed

+20/−12 lines, 6 files

Files

ChangeLog.md view
@@ -3,6 +3,9 @@ ## Unreleased changes ## Unreleased changes +0.3.1.0 Jan 15 2021+  - Slightly improved formatting with SkyLighting and LaTeX+ 0.3.0.0 Jan 15 2021   - Support default syntaxes from skylighting. 
pandoc-filter-indent.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 54950c09cdef3ae347be5565c51f866814024d8f3304665a2873a0acdf7c41a2+-- hash: 6e1538de590d6fe1a3833c723678f5325ccaba06a7fd8be199cc2b56ffa6d038  name:           pandoc-filter-indent-version:        0.3.0.0+version:        0.3.1.0 synopsis:       Pandoc filter formatting Haskell code fragments using GHC lexer. description:    Formats marked code fragments, and allows `pandoc` to safely process rest of your literate program:                 .
src/Render/Latex.hs view
@@ -143,7 +143,8 @@ formatToken (TOther,   "}"     ) = protectText "}" formatToken (TOther,   "{"     ) = protectText "{" -- formatToken (TBlank,   txt     ) = "\\textit{\\textcolor{gray}{" <> protectText txt <> "}}"-formatToken (_,        txt     ) = "\\textit{"     <> protectText txt  <> "}"+formatToken (TVar,        txt     ) = "\\textit{"     <> protectText txt  <> "}"+formatToken (_,  txt     ) = "\\textrm{"     <> protectText txt  <> "}"  mathop :: Text -> Text mathop code = "\\" <> code
src/Token.hs view
@@ -30,6 +30,7 @@   | TVar   | TNum   | TOther+  | TString   | TTikz  Text -- TikZmark in a comment   deriving (Eq, Ord, Show) 
src/Token/Haskell.hs view
@@ -53,6 +53,8 @@ haskellTok OperatorTok    = TOperator haskellTok RationalTok    = TNum haskellTok IntegerTok     = TNum+haskellTok StringTok      = TString+haskellTok CharTok        = TString haskellTok t              = TOther  -- | Extract line number from `ghc-lib` slice location.
src/Token/Skylighting.hs view
@@ -56,24 +56,25 @@ -- | Convert token type of `ghc-lib` into tokens recognized by the filter. skyTok :: TokenType -> MyTok skyTok FloatTok  = TNum-skyTok FloatTok  = TNum skyTok DecValTok  = TNum skyTok BaseNTok  = TNum-skyTok StringTok = TOther-skyTok VerbatimStringTok = TOther-skyTok SpecialStringTok = TOther-skyTok ConstantTok = TOther+skyTok StringTok = TString+skyTok CharTok = TString+skyTok FunctionTok = TVar+skyTok AttributeTok = TBlank+skyTok VerbatimStringTok = TString+skyTok SpecialStringTok = TCons+skyTok ConstantTok = TCons skyTok KeywordTok = TKeyword skyTok BuiltInTok = TKeyword-skyTok CharTok = TOther-skyTok SpecialCharTok = TOther+skyTok PreprocessorTok = TBlank skyTok CommentTok = TBlank skyTok DocumentationTok = TBlank-skyTok CommentTok = TOther+skyTok CommentTok = TBlank skyTok OperatorTok = TOperator skyTok SpecialCharTok = TOperator skyTok RegionMarkerTok = TOperator-skyTok AnnotationTok = TOther+skyTok AnnotationTok = TBlank skyTok ControlFlowTok = TKeyword skyTok VariableTok = TVar skyTok DataTypeTok = TCons