Skip to content

Commit

Permalink
Update packages/mermaid/src/docs/config/usage.md
Browse files Browse the repository at this point in the history
Co-authored-by: Alois Klink <[email protected]>
  • Loading branch information
sidharthv96 and aloisklink authored Dec 8, 2023
1 parent 96c90b2 commit 6f3c920
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mermaid/src/docs/config/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ The `mermaid.parse(text, parseOptions)` function validates graph definitions wit

The function `mermaid.parse(text, parseOptions)`, takes a text string as an argument and returns `{ diagramType: string }` if the definition follows mermaid's syntax.

If the definition is invalid, the function returns `false` if `parseOptions.supressError` is set to `true`. Otherwise, it throws an error.
If the definition is invalid, the function returns `false` if `parseOptions.suppressErrors` is set to `true`. Otherwise, it throws an error.

The parseError function will be called when the parse function throws an error. It will not be called if `parseOptions.supressError` is set to `true`.
The parseError function will be called when the parse function throws an error. It will not be called if `parseOptions.suppressErrors` is set to `true`.

It is possible to override this function in order to handle the error in an application-specific way.

Expand Down

0 comments on commit 6f3c920

Please sign in to comment.