MCPcopy Create free account
hub / github.com/Effect-TS/effect / isHeadingLine

Function isHeadingLine

packages/tools/jsdocs/src/Jsdocs.ts:1407–1412  ·  view source on GitHub ↗
(line: string | undefined)

Source from the content-addressed store, hash-verified

1405}
1406
1407function isHeadingLine(line: string | undefined): boolean {
1408 if (line === undefined) return false
1409 const trimmed = line.trim()
1410 return standardHeadings.includes(trimmed as StandardHeading) || trimmed.startsWith("**Example**") ||
1411 isNearMissHeading(trimmed) || isBoldOnlyLine(trimmed) || isForbiddenMarkdownHeading(trimmed, false)
1412}
1413
1414function isNearMissHeading(line: string): boolean {
1415 return /^\*\*(When to use|When To Use|Details|Gotchas).*\*\*/.test(line) &&

Callers 3

parseDescriptionContentFunction · 0.85
parseSectionFunction · 0.85
parseExampleFunction · 0.85

Calls 3

isNearMissHeadingFunction · 0.85
isBoldOnlyLineFunction · 0.85

Tested by

no test coverage detected