Skip to content

stripCommentSyntax

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/doc-annotations.ts

Strip the comment scaffolding and leave the author's text.

Line structure survives on purpose: descriptions may be markdown, and markdown's meaning lives in its line breaks (lists, fences, paragraphs). Only the per-line comment furniture and the common indent go; blank-line runs are capped at one so a docblock's padding does not become a wall of vertical space.

Signature

ts
function stripCommentSyntax(raw: string, style: CommentStyle): string

Parameters

NameType
rawstring
styleCommentStyle

Returns: string

Was this page helpful?

Download as PDF