quarto-dev / quarto-dev/quarto

Diagram not generated per specified mermaid-format in gfm format

Open
#433 3 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since May 6, 2024.

Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

From Quarto Authoring Diagrams discussion of valid values for mermaid-format I get the suggested yml header below specifying use of javascript, but the output of rendering has an html relative reference to a png file instead of the mermaid code. This is a problem when saving a README.md to an Azure DevOps repo, which rewrites the url in markdown image specifications in the output Markdown file but not in html relative reference currently generated regardless of mermaid-format setting.

 ---
 title: "Test gfm and mermaid"
 format:
     gfm:
         mermaid-format: js
 ---
 
 ## Test Readme
 
 From [Quarto Authoring Diagrams](https://quarto.org/docs/authoring/diagrams.html) discussion of valid values for `mermaid-format` I get the suggested yml header above specifying javascript, but the output of rendering has an html 
relative reference to a png file instead of the mermaid code. This is a problem when saving a README.md to an Azure DevOps repo, which rewrites the url in markdown image specifications in the output Markdown file but not in html relative 
 reference currently generated regardless of `mermaid-format` setting.
 
 ```{dot}
 digraph sample {
     A -> B
 }

yields

```{asis}
<div>
<figure class=''>
<div>
<img src="TestMermaidFormat_files\figure-commonmark\dot-figure-1.png" style="width:7in;height:5in" />
</div>
</figure>
</div>

rather than straight mermaid code.

I have to edit the md file to use markdown image reference in order to get Azure readme.md to display the image. I think either emitting javascript as the documentation indicates or writing out the link in markdown instead of html should make the image show up inline in the Azure-repo-rendered README.md.

Quarto version 1.4.554.
Windows 10 version 22H2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.