hackmdio / hackmdio/hackmd-io-issues

Mermaid gitGraph preview will not render correctly

Open
#315 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
40
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### Is this a hackmd.io issue?

- [x] Yes, the bug happens on https://hackmd.io
- [ ] No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd

### Read our Official tutorial

- [x] done

### What's the problem

The mermaid preview to gitGraph diagram will not render at the first time in **edit + preview split mode**. If i type a space and delete it, it can render the graph on preview side.

However, in **preview mode**, there are no chance to make this kind of change. So, it won't be rendered.

#### Current behaviour

at first time
after type a space and delete it

Provide steps to reproduce:

1. Go to https://hackmd.io/sL497ZI0QfqtAhnancnCtQ?both
2. There are no rendered result in preview side.
3. Type a space in mermaid code block
4. Delete the space you typed
5. See the correct rendering result

If possible, create a note with reproducible content and share the link with us.

1. https://hackmd.io/sL497ZI0QfqtAhnancnCtQ?both
2. https://hackmd.io/@flandrekawaii/HackMD-Mermaid-Diagram-Preview-Repro

#### Expected behaviour

1. I can see correct rendering result in preview side before I type anything while accessing https://hackmd.io/sL497ZI0QfqtAhnancnCtQ?both
2. I can see correct rendering result in https://hackmd.io/@flandrekawaii/HackMD-Mermaid-Diagram-Preview-Repro

#### Environment

I use HackMD on:

**Desktop**
- OS: macOS
- Browser:
- Firefox 108.0.2 (64bit)
- Microsoft Edge 109.0.1518.52 (x86_64)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.