(target: string)
| 1492 | } |
| 1493 | |
| 1494 | function localAssetTargetKind(target: string): ImportedAssetKind | null { |
| 1495 | const clean = target.split('#')[0]?.split('?')[0] ?? target |
| 1496 | const lastDot = clean.lastIndexOf('.') |
| 1497 | if (lastDot === -1) return null |
| 1498 | const ext = clean.slice(lastDot).toLowerCase() |
| 1499 | if (IMAGE_EXTENSIONS.has(ext)) return 'image' |
| 1500 | if (PDF_EXTENSIONS.has(ext)) return 'pdf' |
| 1501 | if (AUDIO_EXTENSIONS.has(ext)) return 'audio' |
| 1502 | if (VIDEO_EXTENSIONS.has(ext)) return 'video' |
| 1503 | return 'file' |
| 1504 | } |
| 1505 | |
| 1506 | /** Pull unique `#tags` out of markdown text, ignoring fenced/inline code. */ |
| 1507 | function extractTags(body: string): string[] { |
no outgoing calls
no test coverage detected