Interface: HighlightOptions
Defined in: string/highlight/index.ts:8
Options for highlight function.
Properties
caseInsensitive?
readonlyoptionalcaseInsensitive:boolean
Defined in: string/highlight/index.ts:28
If true, performs case-insensitive matching.
Default
true
className?
readonlyoptionalclassName:string
Defined in: string/highlight/index.ts:21
CSS class name to add to the tag.
Default
undefined
escapeHtml?
readonlyoptionalescapeHtml:boolean
Defined in: string/highlight/index.ts:36
If true, escapes HTML in the input text before highlighting. This prevents XSS when highlighting user-generated content.
Default
true
tag?
readonlyoptionaltag:string
Defined in: string/highlight/index.ts:14
HTML tag to wrap matched text.
Default
'mark'