45
}
46
} else {
48
>
const printUri = URI.parse(contentRefUrl).with({ path: String(refId) });
49
>
const markdownText = `[${label}](${printUri.toString()})`;
50
>
51
>
const annotationMetadata = { [refId]: item };
52
>
53
>
if (previousItem?.kind === 'markdownContent') {
54
const merged = appendMarkdownString(previousItem.content, new MarkdownString(markdownText));
55
result[previousItemIndex] = { ...previousItem, content: merged, inlineReferences: { ...annotationMetadata, ...(previousItem.inlineReferences || {}) } };
57
result.push({ content: new MarkdownString(markdownText), inlineReferences: annotationMetadata, kind: 'markdownContent' });
58
}
60
} else if (item.kind === 'markdownContent' && previousItem?.kind === 'markdownContent') {
61
if (canMergeMarkdownStrings(previousItem.content, item.content)) {