Skip to content

findSectionRange

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/components/change-requests/section-merge.ts

Find the [start, end) line range of the section in lines, or null when the heading is not present.

Signature

ts
function findSectionRange(lines: string[], heading: string, level: number): { start: number; end: number } | null

Parameters

NameType
linesstring[]
headingstring
levelnumber

Returns: { start: number; end: number } | null

Was this page helpful?

Download as PDF