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

Function isHeadingLine

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

Source from the content-addressed store, hash-verified

1427}
1428
1429function isHeadingLine(line: string | undefined): boolean {
1430 if (line === undefined) return false
1431 const trimmed = line.trim()
1432 return standardHeadings.includes(trimmed as StandardHeading) || trimmed.startsWith("**Example**") ||
1433 isNearMissHeading(trimmed) || isBoldOnlyLine(trimmed) || isForbiddenMarkdownHeading(trimmed, false)
1434}
1435
1436function isNearMissHeading(line: string): boolean {
1437 return /^\*\*(When to use|When To Use|Details|Gotchas).*\*\*/.test(line) &&

Callers 3

parseDescriptionContentFunction · 0.85
parseSectionFunction · 0.85
parseExampleFunction · 0.85

Calls 4

isNearMissHeadingFunction · 0.85
isBoldOnlyLineFunction · 0.85
trimMethod · 0.80

Tested by

no test coverage detected