Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps markdown preview in repo: heading anchors rendering as work item links

I have a markdown file in my Azure DevOps repo. The file has a TOC that uses heading anchors:

- [1. Abstract](#1.-abstract)
- [2. Table of contents](#2.-table-of-contents)
- [3. Introduction](#3.-introduction)
  - [3.1. Recommended reading](#3.1.-recommended-reading)

## 1. Abstract
...
## 2. Table of contents
...
## 3. Introduction
...
### 3.1. Recommended reading

The links work in vs code and any other editor that I use. In Azure DevOps, when navigating to the file and selecting preview, the heading anchors are being rendered as Azure DevOps work item links:

enter image description here

Is there a way to use heading anchors without having them link to work items within Azure DevOps?

like image 724
M.Ob Avatar asked Oct 26 '25 02:10

M.Ob


1 Answers

Instead of manually creating the anchor links you can use the TOC directive. It works not only in the wiki, but also in the preview pane for markdown files.

[[_TOC_]]

## 1. Abstract
...
## 2. Table of contents
...
## 3. Introduction
...
### 3.1. Recommended reading

The result will look like the following (The links are anchor links to each heading)

Exmaple of how TOC looks

like image 189
danielorn Avatar answered Oct 29 '25 09:10

danielorn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!