(text: string | undefined)
| 489 | } |
| 490 | |
| 491 | const parseJsDocText = (text: string | undefined): ParsedJsDocPart[] => { |
| 492 | if (!text) return [] |
| 493 | const sections = text.split(noteDelimiterRegex) |
| 494 | // split can't break at index 0, so text after a {@link} may open with a note |
| 495 | return sections.map((sectionText, i) => |
| 496 | i === 0 && !noteDelimiterRegex.test(sectionText) ? |
| 497 | { kind: "text", value: sectionText } |
| 498 | : { kind: "noteStart", value: sectionText.trimStart() } |
| 499 | ) |
| 500 | } |
| 501 | |
| 502 | const describedLinkRegex = /{@link\s+(https?:\/\/[^\s|}]+)(?:\s*\|\s*([^}]*))?}/ |
| 503 |
no test coverage detected