Copyright | © 2018–2019 Mark Karpov |
---|---|
License | BSD 3 clause |
Maintainer | Mark Karpov <markkarpov92@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Use the ghc-syntax-highlighter
package to highlight Haskell code. This
module only works with GHC 8.4.1 and newer (with older versions the
extension just won't have any effect).
Since: 0.2.1.0
Synopsis
Documentation
ghcSyntaxHighlighter :: Extension Source #
Use the ghc-syntax-highlighter
package to highlight Haskell code. The
extension is applied only to code blocks with info string "haskell"
.
The resulting code block will be wrapped in a div
with class
"source-code"
. The following span
classes can be used for styling:
KeywordTok
="kw"
PragmaTok
="pr"
SymbolTok
="sy"
VariableTok
="va"
ConstructorTok
="cr"
OperatorTok
="op"
CharTok
="ch"
StringTok
="st"
IntegerTok
="it"
RationalTok
="ra"
CommentTok
="co"
SpaceTok
= noOtherTok
="ot"
To use with skylighting
the extension
should be applied after the
skylighting
extension so it can
overwrite its logic for code block with "haskell"
info string. So
place it on the left hand side of (
or above
<>
)skylighting
in the list passed to
useExtensions
.