mjbvz / vscode-markdown-mermaid

Adds Mermaid diagram and flowchart support to VS Code's builtin markdown preview
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
MIT License
651 stars 119 forks source link

1.24.0 breaks things #285

Closed michele-nuzzi closed 1 day ago

michele-nuzzi commented 3 days ago

this is a chart that was working before 1.24.0 and broke with the last update

```mermaid
flowchart LR
    subgraph transferManager
        transferManagerPolicy[(transfer manager policy)]
        transferManagerContract[transfer manager]
        transferManagerObserver([transfer manager observer])

        transferManagerPolicy -. mints CNTs .-> transferManagerContract

        transferManagerContract <-. validates many inputs .-> transferManagerObserver 

        transferManagerContract -- transfer --> transferManagerContract

    end

    subgraph stateManager
        stateManagerPolicy[(state manager policy)]
        stateManagerContract[state manager]

        stateManagerPolicy -. mints validity NFTs .-> stateManagerContract

        stateManagerContract -- mutates state --> stateManagerContract
    end

    stateManager -. hash .-> transferManager
```

Workaround

manually install 1.23.1

michele-nuzzi commented 3 days ago

btw loops are displayed strangely here on GitHub for some reason

whitelizard commented 2 days ago

Have the same problem. I had to downgrade to 1.23.1.

Here is an example that crashes or miss-renders in 1.24.0:

graph TD
  MachineConf -->|createMachine| m([Machine])
  m -->|.provide| m
  subgraph ActorLogic
    m
  end
  ActorLogic -->|createActor| Actor
  ActorLogic -->|useActor| Actor
  ActorLogic -->|useMachine| Actor
  ActorLogic -->|invoke| Actor
  AsyncFunc -->|fromPromise| ActorLogic
  callbackFunc -->|fromCallback| ActorLogic
graph TD
  MachineConf -->|createMachine| m([Machine])
  m -->|.provide| m
  subgraph ActorLogic
    m
  end
  ActorLogic -->|createActor| Actor
  ActorLogic -->|useActor| Actor
  ActorLogic -->|useMachine| Actor
  ActorLogic -->|invoke| Actor
  AsyncFunc -->|fromPromise| ActorLogic
  callbackFunc -->|fromCallback| ActorLogic

How it used to look:

image

mjbvz commented 1 day ago

I confirmed out rendering matches mermaid.live in these cases

Please file an issue against Mermaid directly so they can investigate: https://github.com/mermaid-js/mermaid/issues