mmark-ext-0.2.1.1: Commonly useful extensions for the MMark markdown processor

Copyright© 2018 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. 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:

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.