Agents window Markdown preview renders link reference definitions instead of hiding them
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.137.0
- OS Version: Windows _NT x64 10.0.26200
- Remote: WSL: Ubuntu-24.04
- OS: Linux x64 6.18.33.2-microsoft-standard-WSL2
### Description
The Markdown preview in the Agents window does not consume
[link reference definitions](https://spec.commonmark.org/0.31.2/#link-reference-definitions).
The references themselves resolve correctly and render as links, but every
definition line is additionally shown as a visible block at the bottom of the
document.
Per CommonMark, a link reference definition produces no output of its own.
### Steps to Reproduce
1. Create a file `README.md` with the following content:
```markdown
# Step Templates
| Template | Docs |
| --- | --- |
| `docker-login.yml` | [docker-login.md][1] |
| `docker-logout.yml` | [docker-logout.md][2] |
[1]: docker-login.md
[2]: docker-logout.md
```
2. Open the file in the Agents window.
3. Look at the area below the table.
### Expected behavior
The two definition lines are consumed while resolving `[1]` and `[2]` and
produce no visible output, as they do in the regular VS Code Markdown preview,
on GitHub and in Azure DevOps Repos.
### Actual behavior
Each definition is rendered as a separate code-style block:
```
[1]: docker-login.md
[2]: docker-logout.md
```
See the attached screenshot.
### Additional context
The same file renders as expected in the built-in Markdown preview of the main
VS Code window, so this looks specific to the Markdown renderer used in the
Agents window.
Contributor guide
Assessment
This issue has not been assessed yet.