mmark-ext-0.2.1.5: Commonly useful extensions for the MMark markdown processor
Copyright© 2018–present Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <markkarpov92@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Text.MMark.Extension.GhcSyntaxHighlighter

Description

Use the ghc-syntax-highlighter package to highlight Haskell code.

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 the 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:

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.