@comfit/rehype / Options
Interface: Options
Defined in: index.ts:26
Rendering, language selection, and line emphasis for code blocks.
Properties
aliases?
optionalaliases?:Readonly<Record<string,string>>
Defined in: index.ts:32
Additional aliases, resolved once before checking built-in IDs and aliases.
classPrefix?
optionalclassPrefix?:string
Defined in: index.ts:46
Prefix for generated token, rainbow, and line classes. Defaults to an empty string.
defaultLanguage?
optionaldefaultLanguage?:string
Defined in: index.ts:30
Language for blocks without a language class. Otherwise leave them unchanged.
defaultTheme?
optionaldefaultTheme?:string
Defined in: index.ts:38
Default name in themes. Requires themes.
highlightedLines?
optionalhighlightedLines?: readonlynumber[]
Defined in: index.ts:54
One-based source lines to emphasize in every block. Defaults to an empty list.
lineTag?
optionallineTag?:string
Defined in: index.ts:50
Line tag name. Defaults to "span".
metaHighlight?
optionalmetaHighlight?:boolean
Defined in: index.ts:56
Read line ranges such as {2,4-6} from code.data.meta. Defaults to true.
preClass?
optionalpreClass?:string
Defined in: index.ts:52
Classes appended to the existing outer element's classes.
preTag?
optionalpreTag?:string
Defined in: index.ts:48
Outer tag name. Defaults to "pre".
rainbow?
optionalrainbow?:boolean
Defined in: index.ts:42
Collect rainbow bracket depths. Defaults to true.
rainbowColors?
optionalrainbowColors?:number
Defined in: index.ts:44
Rainbow class wrapping count. Zero preserves depth without a theme palette. Defaults to zero.
style?
optionalstyle?:"class"|"inline"|"variables"
Defined in: index.ts:40
Defaults to "inline" with themes, otherwise "class". Inline output requires a theme.
theme?
optionaltheme?:string
Defined in: index.ts:34
Bundled theme ID. Cannot be combined with themes.
themes?
optionalthemes?:Readonly<Record<string,string>>
Defined in: index.ts:36
Named bundled themes for inline output. The first name is the default unless selected.
unknownLanguage?
optionalunknownLanguage?:"skip"|"error"
Defined in: index.ts:28
Skip unknown languages or fail the file. Defaults to "skip".