ti7
ti7

Reputation: 18836

How can I make a large code block hidden until selected by a reviewer in Azure Devops?

Reviewing a pull request, I reflowed a relatively large JSON-like block that would be best hidden until expanded by the author.

This is apparently possible via HTML support for <details><summary>, but the relevant ticket I found provides a positive, yet unhelpful message

There is no documentation explicitly for HTML syntaxes.

What should I use to make a very large code block hidden (but toggleable) by reviewers in Azure Devops Markdown?

Upvotes: 1

Views: 315

Answers (1)

ti7
ti7

Reputation: 18836

Per the latest docs, there is indeed a trick, which is to put a blank line after the HTML element to allow nested markdown, and otherwise use a <details><summary> tag normally

<details>
<summary>
Code Block Title
</summary>
<p>

```python
large_helpful_dict = {
    "complex JSON-like object": {
        "with nested keys": "and values"
    }
}
```
</p>
</details>

[meta]: to get this on SO without ZA̡͊͠͝LGΌ, use a 4 spaces-style code block

Upvotes: 0

Related Questions