Skip to content

extractProtectedSegments

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/l10n/translation-format.ts

Ordered protected segments of a markdown page: whole fenced code blocks (``` / ~~~, fences included) and directive lines (trimmed line starting with ::: or ::). Indented code blocks are NOT protected (they are indistinguishable from lists at this altitude); Atloria generators emit fenced blocks only.

Signature

ts
function extractProtectedSegments(markdown: string): string[]

Parameters

NameType
markdownstring

Returns: string[]

Was this page helpful?

Download as PDF