mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-19 10:45:30 +08:00
T.P.Highlighting: export typst functions.
[API change] New exported functions `formatTypstBlock`, `formatTypstInline`, `styleToTypst`.
This commit is contained in:
@@ -30,6 +30,10 @@ module Text.Pandoc.Highlighting ( highlightingStyles
|
||||
, formatConTeXtBlock
|
||||
, styleToConTeXt
|
||||
, formatANSI
|
||||
-- ** Typst
|
||||
, formatTypstBlock,
|
||||
, formatTypstInline,
|
||||
, styleToTypst,
|
||||
-- * Styles
|
||||
, defaultStyle
|
||||
, pygments
|
||||
@@ -45,12 +49,47 @@ module Text.Pandoc.Highlighting ( highlightingStyles
|
||||
, fromListingsLanguage
|
||||
, toListingsLanguage
|
||||
) where
|
||||
import Control.Monad
|
||||
import Control.Monad ( msum )
|
||||
import qualified Data.Map as M
|
||||
import Data.Maybe (fromMaybe)
|
||||
import qualified Data.Text as T
|
||||
import Skylighting
|
||||
import Text.Pandoc.Definition
|
||||
( SyntaxMap,
|
||||
breezeDark,
|
||||
espresso,
|
||||
haddock,
|
||||
kate,
|
||||
monochrome,
|
||||
pygments,
|
||||
tango,
|
||||
zenburn,
|
||||
formatHtml4Block,
|
||||
formatHtmlBlock,
|
||||
formatHtmlInline,
|
||||
styleToCss,
|
||||
formatConTeXtBlock,
|
||||
formatConTeXtInline,
|
||||
styleToConTeXt,
|
||||
formatLaTeXBlock,
|
||||
formatLaTeXInline,
|
||||
styleToLaTeX,
|
||||
formatTypstBlock,
|
||||
formatTypstInline,
|
||||
styleToTypst,
|
||||
formatANSI,
|
||||
Style,
|
||||
FormatOptions(containerClasses, startNumber, lineAnchors,
|
||||
numberLines, lineIdPrefix, codeClasses),
|
||||
SourceLine,
|
||||
lookupSyntax,
|
||||
syntaxesByExtension,
|
||||
parseTheme,
|
||||
tokenize,
|
||||
defaultFormatOpts,
|
||||
TokenizerConfig(traceOutput, TokenizerConfig, syntaxMap),
|
||||
Syntax(sShortname, sName),
|
||||
TokenType(NormalTok) )
|
||||
import Text.Pandoc.Definition ( Attr )
|
||||
import Text.Pandoc.Class (PandocMonad, readFileLazy)
|
||||
import Text.Pandoc.Error (PandocError(..))
|
||||
import Control.Monad.Except (throwError)
|
||||
|
||||
Reference in New Issue
Block a user