backmarket-oss / github-mermaid-extension

A browser extension for Chrome, Opera & Firefox that adds Mermaid language support to Github
MIT License
239 stars 65 forks source link

Add support for Azure DevOps wikis #7

Open alarobric opened 5 years ago

alarobric commented 5 years ago

Adds support for Azure DevOps wikis.

Not a lot of changes were required, just adding the URLs to the manifest, and adjusting the selectors.

Azure DevOps seems to put all markdown code blocks into pre[class="hljs"] elements, with a code element under that. Unfortunately they don't expose the language when set to mermaid, but they do expose it for more well-known languages, so I added a selector to exclude any elements where the language is set. This should reduce conflicts with other code block types, but won't fully remove the risk of conflicts.

alarobric commented 5 years ago

This would resolve #5 also.

dannymyers commented 5 years ago

@alarobric Some Corporate AzureDevOps teams are still using *.visualstudio.com for their endpoint. Can that be included as well?

ghost commented 5 years ago

@alarobric thanks for your contribution. Now I could use Azure DevOps using Edge Insider with mermaid

evertonmc commented 5 years ago

Actually a configuration UI is needed to setup supported domains, because Azure DevOps Server can run under ANY Url, so this should be also supported

amercier commented 5 years ago

@alarobric Thanks for the PR! I'll have a look at this when I can find some time. This weekend, I hope.

dannymyers commented 4 years ago

@amercier any chance you can take a look at this PR?

amercier commented 4 years ago

@dannymyers Sorry I have been caught by something else, and then I totally forgot to come back at it.

jamesewatkins commented 4 years ago

@amercier @dannymyers Direct support for mermaid.js was added to the Azure DevOps wikis in Sprint 158. So I'm not sure this particular change is necessary any longer.

Currently Microsoft is using mermaid.js version 8.2.6 and that is becoming increasingly challenging to use since it only offers support for Flowcharts, Sequence diagrams, and Gantt Charts. What would be nice is support the ability to highjack the version that Microsoft is using to swap it out with a given version.

derekjwilliams commented 4 years ago

It would be brilliant if this PR was in the extension. While the Azure DevOps Wiki does support Mermaid, the rest of the Azure DevOps pages do not, e.g. README.md