typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

Mermaid code highlighting when using flowchart

Open Lakitna opened this issue 2 years ago • 2 comments

  • [x] Searched existing issues to avoid creating duplicates.

  • [x] Confirmed that it can be reproduced in built-in themes without customized css.

    If it only exists in 3rd party themes or css, you can still report it, but please attach the theme target or the css file. We may not "fix" it, if it is caused by 3rd party themes or css styles that we cannot support.

  • [x] Searched http://support.typora.io/


Describe the bug

Mermaid code blocks are great. When using most diagram types, the code highlights properly too.

However, code highlighting is broken for the diagram type flowchart. Rendering of the diagram does work properly.

To Reproduce Steps to reproduce the behavior:

  1. Create a code block with language mermaid
  2. Create a diagram of type flowchart

Expected behavior I expect code highlighting to work for all supported diagram types.

Screenshots / Screencasts

Chart type graph (works as expected) image

Chart type flowchart (renders properly, but no code highlighting) image

Sample Markdown File

```mermaid
graph LR

P[Provider]
PC[Provider Contract]
CC[Consumer Contract]
C[Consumer]

P --- PC
PC --> CC --> PC
CC --- C
```

```mermaid
flowchart LR

P[Provider]
PC[Provider Contract]
CC[Consumer Contract]
C[Consumer]

P --- PC
PC --> CC --> PC
CC --- C
```

Desktop (please complete the following information):

  • OS: Windows 11 64bit

Typora Version e.g: 1.2.5

Lakitna avatar Apr 22 '22 08:04 Lakitna

this happens on macOS 12.4 as well; dev 1.3.3

tennr avatar Jun 08 '22 00:06 tennr

Same here, both Windows 10 and macOS.

nanoant avatar Jun 10 '22 19:06 nanoant