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

Mermaid directives cause a parse error #204

Closed
matthias-colt opened this issue Jun 12, 2023 · 2 comments
Closed

Mermaid directives cause a parse error #204

matthias-colt opened this issue Jun 12, 2023 · 2 comments

Comments

@matthias-colt
Copy link

If there are directives in the mermaid code, it is not rendered by this extension.

Example:

```mermaid
flowchart LR
  %%{init: {'flowchart':{'useMaxWidth': false}}}%%
  A --> B
  A --> C
  B --> C
```

This causes an error:

Parse error on line 2:
flowchart LR  %%{init: {'flowchart
--------------^
Expecting 'SEMI', 'NEWLINE', 'SPACE', 'EOF', 'subgraph', 'end', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'AMP', 'ALPHA', 'COLON', 'STYLE', 'LINKSTYLE', 'CLASSDEF', 'CLASS', 'CLICK', 'DOWN', 'DEFAULT', 'NUM', 'COMMA', 'MINUS', 'BRKT', 'DOT', 'direction_tb', 'direction_bt', 'direction_rl', 'direction_lr', 'PUNCTUATION', 'UNICODE_TEXT', 'PLUS', 'EQUALS', 'MULT', 'UNDERSCORE', got 'open_directive'

There is a PR #192 for support of directives, but this seems only for settings.json and not for the mermaid markup parser if I correctly understand.

@matthias-colt matthias-colt changed the title Mermaid directives not supported Mermaid directives cause a parse error Jun 12, 2023
@mjbvz
Copy link
Owner

mjbvz commented Dec 6, 2023

Seems to be working for me with version 1.21 of this extension:

Image

@mjbvz mjbvz closed this as completed Dec 6, 2023
@palto42
Copy link

palto42 commented Dec 7, 2023

Thanks, works for me as well now :)

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

No branches or pull requests

3 participants