Mermaid fails to render sequenceDiagram after trying to destroy participant

Steps to reproduce

  1. Just create a mermaid sequenceDiagram character by character like:
sequenceDiagram
	A->>B: Hi, B!
	B->>C: Hi, C!
	destroy C
	C->>B: Bye, B!
  1. Create another mermaid sequenceDiagram like:
sequenceDiagram
	D->>E: Hi, E!
  1. Create another type of diagram like:
classDiagram
	class Test{
		-resources
		+register()
	}
  1. Restart Obsidian.

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

All diagrams are always correctly renderred after I finished coding.

Actual result

Before I restart Obsidian, mermaid renderer says for all the sequenceDiagrams:

Error parsing Mermaid diagram!

The destroyed participant C does not have an associated destroying message after its declaration. Please check the sequence diagram.

But when it comes to other diagrams, rendering works properly all the time.

Environment

SYSTEM INFO:
	Obsidian version: v1.5.12
	Installer version: v1.4.16
	Operating system: Windows 10 Pro 10.0.22631
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

Before restart Obsidian:

After restart Obsidian:

I noticed that mermaid document have pointed out that this is a bug from an old version. So I wonder if we have any plan to upgrade the mermaid version?
Mermaid.js Doc