Skip to content

escapeJsxAttribute

Escape text for use inside a JSX attribute: attr=“…” (MDX uses HTML-style parsing)

Import:

import { escapeJsxAttribute } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-text-utils';

Signature:

function escapeJsxAttribute(text: string): string

Parameters:

Parameter Type Description
text string The text to escape.

Returns: string — The escaped text.