( locationData: FullLocationData, sourceLines: string[], sourceTags?: string, )
| 93 | ]; |
| 94 | |
| 95 | function buildInsertions( |
| 96 | locationData: FullLocationData, |
| 97 | sourceLines: string[], |
| 98 | sourceTags?: string, |
| 99 | ): Insertion[] { |
| 100 | const tags = (sourceTags ? parseSourceTags(sourceTags) : []); |
| 101 | |
| 102 | return tags.map((tag) => { |
| 103 | const { insertAfterLine, indent } = deriveAnchor(tag, tags, locationData, sourceLines); |
| 104 | const annotation = `${indent}${tagDescription(tag, locationData, sourceLines)}`; |
| 105 | return { insertAfterLine, annotation, startIndex: tag.startIndex, endIndex: tag.endIndex }; |
| 106 | }); |
| 107 | } |
| 108 | |
| 109 | function deriveAnchor( |
| 110 | tag: SourceTagEntry, |
no test coverage detected