How can I make a code section in the Azure DevOps comment collapsable?

1.1k views Asked by At

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. enter image description here

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. enter image description here

So, is there a way to add the collapsable code sections to the Azure DevOps ticket comments?

0

There are 0 answers