pandoc-filter-indent-0.3.3.0: Pandoc filter formatting Haskell code fragments using GHC lexer.
Safe HaskellNone
LanguageHaskell2010

Token.Skylighting

Description

Skylighting code tokenizer

Synopsis

Documentation

lookupTokenizer :: [Text] -> Maybe Syntax Source #

Looks up the tokenizer from Skylighting preset library by the short name of the language. Picks the first match.

tokenizer Source #

Arguments

:: Syntax 
-> Text

Input text of code block

-> Maybe [(MyTok, MyLoc, Text)] 

Attempt to tokenize input, returns Nothing if unsuccessful, so the processor can just pass input further when tokenizer fails.

fixBackslashOperators :: [(MyTok, MyLoc, Text)] -> [(MyTok, MyLoc, Text)] Source #

Fix Skylighting's incorrect tokenization of backslash operators. Skylighting incorrectly splits operators like +, >, /, etc. This function merges them back together to match Haskell tokenizer behavior.