facebook / facebook/docusaurus

Mermaid in tabs. The arrows are not displayed in the second tab

Abierto
#8,357 8 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
66.2k
Forks
10k
Merge medio
1 d 3 h
PR fusionados (30 d)
52

Descripción

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).

### Prerequisites

- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn clear` command.
- [ ] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
- [ ] I have tried creating a repro with https://new.docusaurus.io.
- [ ] I have read the console error message carefully (if applicable).

### Description

Discussion from https://stackoverflow.com/questions/74474982/mermaid-in-tabs

The **arrows** are not displayed in the second tab
It works here https://docusaurus.io/tests/pages/diagrams#mermaid-in-tabs

I have:

a) In "tab-a", the arrows are displayed:

> ![Tab a](https://i.stack.imgur.com/1BqvT.png)

b) But in "tab-b", the arrows are **not** displayed:

> ![Tab b](https://i.stack.imgur.com/tLztM.png)

---

Version of docusaurus: 2.2.0
Type files: .md or .mdx

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';


The following mermaid diagram is shown:

```mermaid
graph LR
a ---> c(10)
b ---> c(10)
```

This mermaid diagram is not displayed:

```mermaid
graph LR
d ---> z(42)
e ---> z(42)
```


### Reproducible demo

_No response_

### Steps to reproduce

1. Create new file .md
2. Add mermaid diagram graph LR in two tab

### Expected behavior

Arrows are displayed in all tabs

### Actual behavior

The **arrows** are not displayed in the second tab

### Your environment

- Docusaurus version used: 2.2.0

### Self-service

- [ ] I'd be willing to fix this bug myself.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.