Skip to content

spliceSection

reference
1 min readUpdated

Kind: Function

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

Replace one heading-delimited section of content with replacement. If the section is not found in the current content, the section is appended at the end (the proposal introduced a new section).

Signature

ts
function spliceSection(content: string, heading: string, level: number, replacement: string): string

Parameters

NameType
contentstring
headingstring
levelnumber
replacementstring

Returns: string

Was this page helpful?

Download as PDF