Skip to main content

Interface: HighlightOptions

Defined in: string/highlight/index.ts:8

Options for highlight function.

Properties

caseInsensitive?

readonly optional caseInsensitive: boolean

Defined in: string/highlight/index.ts:28

If true, performs case-insensitive matching.

Default

true

className?

readonly optional className: string

Defined in: string/highlight/index.ts:21

CSS class name to add to the tag.

Default

undefined

escapeHtml?

readonly optional escapeHtml: 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?

readonly optional tag: string

Defined in: string/highlight/index.ts:14

HTML tag to wrap matched text.

Default

'mark'