How can I make a code section in the Azure DevOps comment collapsable?
I need this for the cases when I paste a lot of code or JSON. I tried two things.
First, I tried just clicking the Code
button in the editor. It just adds the gray background, but does not make the section collapsable.
Second thing I tried is to use the markdown. I put the following text:
<details open>
<summary>Click to collapse</summary>
var a = 2;
</details>
But saving the changes did not render any collapse controls. It just literally displayed the text I put.
So, is there a way to add the collapsable code sections to the Azure DevOps ticket comments?
Microsoft explains how:
A collapsible section with markdown
<details>
<summary>Click to expand!</summary>
## Heading
1. A numbered
2. list
* With some
* Sub bullets
</details>
Just follow this approach. It worked for me