Skip to Content
Md2Docx logo Md2Docx

createLowlightTokenizer()

Updated 10 Nov 2026

createLowlightTokenizer(lowlight?, highlightAuto?): (code, language?) => Token[][]

Defined in: packages/code-lowlight/src/code-lowlight.ts:137

Creates a lowlight-powered tokenizer function compatible with @m2d/code.

Parameters

lowlight?

NameTypeDescription
highlight(language, value, options?) => Root-
highlightAuto(value, options?) => Root-
listLanguages() => string[]-
register\{(grammars): undefined; (name, grammar?): undefined; \}-
registerAlias\{(aliases): undefined; (language, alias?): undefined; \}-
registered(aliasOrName) => boolean-

highlightAuto?

boolean = true

Returns

(code, language?) => Token[][]

On this page