LineNumbers
Renders line numbers for the CodeBlock component.
API Reference
Properties
| Property | Type | |
|---|---|---|
| highlightRanges? | string | |
| css? | CSSObject | |
| className? | string | |
| style? | CSSProperties | |
Renders line numbers for the CodeBlock component.
Properties
LineNumbersPropsCalculate which lines to highlight based on the range meta string added by the rehype plugin.
function calculateLinesToHighlight(ranges: string | undefined): (index: number) => booleanParameters
| Parameter | Type | Default Value |
|---|---|---|
| ranges | ranges: string | undefined | — |
Returns
(index: number) => booleanLast updated