quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.92k stars 324 forks source link

Memaid text on links covered by link line when rendered to html #8213

Closed cudawarped closed 10 months ago

cudawarped commented 10 months ago

Bug description

Using mermaid to draw a flow diagram with text on links, the text is highlighted when rendered to a pdf but it is obscured by the link line and not highlighted when rendered to html.

Steps to reproduce

---
title: "Memaid"
format: 
  html:
    toc: true
  pdf:
    toc: true
---

```{mermaid}
flowchart LR
  A(A) -- To -->B(B)

quarto render mermaid.qmd --to pdf
quarto render mermaid.qmd --to html

### Expected behavior

I expected both the pdf and html to look the same with the text highlighted as [shown](https://mermaid.live/edit#pako:eNoVyr0KgzAUhuFbCd-koDeQoaB07NR2zHJITqqQn5KeIEW8d-Py8g7PDpsdQ8OHvNmFiqjH0ySlpm7q1Tiqd269zd3cY0DkEml1je-XMZCFIxvoto491SAGJh2NUpX8-icLLaXygPp1JHxf6VMoQnsKPz5OdVkoNQ) in the live mermaid editor.

### Actual behavior

The pdf document apears in the same way as shown in the live mermaid editor but in the html output the text is not highlighted and is obscured by the link line.

### Your environment

- IDE: cmd 
- OS: Windows 11

### Quarto check output

[>] Checking versions of quarto binary dependencies... Pandoc version 3.1.1: OK Dart Sass version 1.55.0: OK [>] Checking versions of quarto dependencies......OK [>] Checking Quarto installation......OK Version: 1.3.450 Path: C:\Users\b\AppData\Local\Programs\Quarto\bin CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK Version: 3.9.16 (Conda) Path: C:/Users/b/mambaforge/python.exe Jupyter: 4.11.1 Kernels: dyalog-kernel, python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........(None)

  Unable to locate an installed version of R.
  Install R from https://cloud.r-project.org/
cscheid commented 10 months ago

I can't reproduce this on 1.4. Quarto ships with whatever version of Mermaid was the latest at the time of release, and I believe that explains the discrepancy. In 1.4, I see this:

image

and this:

image
mcanouil commented 10 months ago

The version of Mermaid.js are not the same. Quarto does not and cannot embed latest version especially in 1.3. Quarto 1.4 has not the issue you are reporting which is likely because it embeds a newer (not the latest) version than 1.3.450.