(text: string)
| 1936 | } |
| 1937 | |
| 1938 | function renderInlineLinks(text: string): string { |
| 1939 | return text.replace(/\{@link\s+([^}]+)\}/g, (_match, content: string) => { |
| 1940 | const pipeIndex = content.indexOf("|") |
| 1941 | const beforeLabel = pipeIndex === -1 ? content.trim() : content.slice(0, pipeIndex).trim() |
| 1942 | const target = beforeLabel.split(/\s+/)[0] ?? "" |
| 1943 | const label = pipeIndex === -1 |
| 1944 | ? beforeLabel.slice(target.length).trim() || target |
| 1945 | : content.slice(pipeIndex + 1).trim() || target |
| 1946 | return `\`${label.replace(/:var$/, "")}\`` |
| 1947 | }) |
| 1948 | } |
| 1949 | |
| 1950 | function renderDescription(description: ParsedDescription): ParsedDescription { |
| 1951 | return { |
no test coverage detected