Skip to main content

Function: getTextContentLines()

function getTextContentLines(text: string): readonly Readonly<{
end: number;
start: number;
text: string;
}>[];

Defined in: _internal/text-content-lint.ts:141

Split raw Markdown/MDX text into logical lines without trailing newlines.

Parametersโ€‹

textโ€‹

string

Full Markdown/MDX source text.

Returnsโ€‹

readonly Readonly<{ end: number; start: number; text: string; }>[]

Lines with inclusive-exclusive source ranges.