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

Better syntax error reporting #129

Open
pcholakov opened this issue Apr 12, 2022 · 1 comment
Open

Better syntax error reporting #129

pcholakov opened this issue Apr 12, 2022 · 1 comment

Comments

@pcholakov
Copy link

pcholakov commented Apr 12, 2022

This can be seen as a continuation of #46

Syntax errors are currently not reported with any level of detail by extension v1.13.2, e.g.:

```mermaid
sequenceDiagram

A - > B: test
B --> A: error
```

Produces this output in the preview pane:

image

By contrast, the Mermaid online editor will helpfully point to the location of the problem:

image

@pcholakov
Copy link
Author

Haven't looked at the extension code but the Mermaid docs now show a mechanism for registering a syntax error callback - from https://mermaid-js.github.io/mermaid/#/usage?id=advanced-usage:

mermaid.parseError = function(err,hash){
    displayErrorInGui(err);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants