Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change mermaid from cdn to npm #357

Merged
merged 1 commit into from
Aug 27, 2024
Merged

chore: change mermaid from cdn to npm #357

merged 1 commit into from
Aug 27, 2024

Conversation

YangFong
Copy link
Member

  • 将 mermaid 用法从 cdn 改为 npm
  • 修复首次渲染时,多个 mermaid 可能产生的错误

Copy link

github-actions bot commented Aug 27, 2024

🎊 PR Preview has been successfully built and deployed to https://doocs-md-preview-pr-357.surge.sh

@YangFong
Copy link
Member Author

测试数据:

# 图表测试


```mermaid
pie
 title Key elements in Product X
 "Calcium" : 42.96
 "Potassium" : 50.05
 "Magnesium" : 10.01
 "Iron" : 5
```

```mermaid
classDiagram
Class01 <|-- AveryLongClass : Cool
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
```


```mermaid
pie
 title Key elements in Product X
 "Calcium" : 42.96
 "Potassium" : 50.05
 "Magnesium" : 10.01
 "Iron" : 5
```


```mermaid
pie
 title 为什么总是宅在家里?
 "喜欢宅" : 45
 "天气太热" : 70
 "穷" : 500
 "关你屁事" : 95
```

```mermaid
pie
 title 为什么总是宅在家里?
 "喜欢宅" : 45
 "天气太热" : 70
 "穷" : 500
 "关你屁事" : 95
```


```mermaid
pie
 title 为什么总是宅在家里?
 "喜欢宅" : 45
 "天气太热" : 70
 "穷" : 500
 "关你屁事" : 95
```

```mermaid
pie
 title 为什么总是宅在家里?
 "喜欢宅" : 45
 "天气太热" : 70
 "穷" : 500
 "关你屁事" : 91
```

```mermaid
pie
 title 为什么总是宅在家里?
 "喜欢宅" : 45
 "天气太热" : 70
 "穷" : 500
 "关你屁事" : 9
```


```mermaid
pie
 title 为什么总是宅在家里?
 "喜欢宅" : 45
 "天气太热" : 70
 "穷" : 500
 "关你屁事" : 95
```

@yanglbme yanglbme merged commit 223d59b into main Aug 27, 2024
2 checks passed
@yanglbme yanglbme deleted the chore/mermaid branch August 27, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants