I had this very same issue. Sadly in the code repos themselves you cannot view the rendered diagrams.
The diagrams (and only a few supported types are rendered) are only rendered in the "Wiki from code"
There is this extension in the VS Marketplace to render the
.mmd mermaid files but that's not inline documentation with markdown.
There's also the issue that the syntax for mermaid diagrams in the markdown documents breaks traditional spec by using colons instead of backquotes:
This wrecks many mermaid plugins in editors like VS Code when it comes to syntax highlighting language support. But thankfully that will actually still render in the markdown preview panes.
- VSCode Mermaid Extensions
- Syntax highlighting for mermaid code in code fences (not DevOps Colon syntax)
Some workaround for viewing mermaid diagrams in the markdown documents without being in the code wiki is the use of mermaid INK, with an issue I filed recently, they also updated the supported graph types on mermaid INK so now we can embed the diagrams that way and can get around the outdated version of mermaid that DevOps currently supports.
To use mermaid INK all you need to do is write your mermaid code in the I've editor and then grab the markdown link at the bottom of the editor and embed the diagram into your markdown document. This is a hack because now you lose out on version control of plain text diagram code, but the link to the image will take you back to the editor with an exact copy of the code you used to generate it.