mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.37k stars 226 forks source link

Timeline diagrams fail #493

Closed AddictArts closed 1 year ago

AddictArts commented 1 year ago

Using a timeline in your input .md file will fail, with the following error.

Error: Evaluation failed: Error: No diagram type detected for text: timeline
    title History of Social Media Platform
    2002 : LinkedIn
    2004 : Facebook
         : Google
    2005 : Youtube
    2006 : Twitter
    at pptr://__puppeteer_evaluation_script__:21:17
    at ExecutionContext._ExecutionContext_evaluate (file:///AppData/Roaming/npm/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:251:15)
 ...
at async renderMermaid (file:///AppData/Roaming/npm/node_modules/@mermaid-js/mermaid-cli/src/index.js:215:22)

To reproduce use the example timeline

```mermaid
timeline
    title History of Social Media Platform
    2002 : LinkedIn
    2004 : Facebook
         : Google
    2005 : Youtube
    2006 : Twitter


Issues exists on all platforms and combinations etc.
aloisklink commented 1 year ago

timeline diagrams were only recently added in Mermaid v9.4.0.

PR https://github.com/mermaid-js/mermaid-cli/pull/489 will update mermaid-cli to also use Mermaid v9.4.0, which should add support for timeline.

But we should probably add a test-case after that PR is merged, just to make confirm that. I remember that getting Mermaid mindmaps working was non-trivial when Mermaid v9.2.0 came out.