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

Function parseLooseJSDocBlock

packages/tools/jsdocs/src/Jsdocs.ts:951–959  ·  view source on GitHub ↗
(raw: string, range: [number, number])

Source from the content-addressed store, hash-verified

949}
950
951function parseLooseJSDocBlock(raw: string, range: [number, number]): JSDocBlock {
952 const body = raw.replace(/^\/\*\*/, "").replace(/\*\/$/, "")
953 const rawLines = body.split(/\r\n|\r|\n/)
954 const lines = rawLines.map((line) => line.replace(/^\s*\* ?/, "").trimEnd())
955 const normalized = trimStructuralBlankLines(lines)
956 const tags = parseTags(normalized)
957 const internal = tags.some((tag) => tag.name === "internal")
958 return { range, raw, lines: normalized, tags, diagnostics: [], internal }
959}
960
961function parseJSDocBlock(raw: string, range: [number, number]): JSDocBlock {
962 const base = parseLooseJSDocBlock(raw, range)

Callers 4

parseJSDocBlockFunction · 0.85
moduleSeeTagsFunction · 0.85
checkModuleExamplesFunction · 0.85
parseModuleJSDocTsFunction · 0.85

Calls 6

trimStructuralBlankLinesFunction · 0.85
parseTagsFunction · 0.85
someMethod · 0.80
replaceMethod · 0.45
splitMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected