Skip to content

Commit

Permalink
Merge branch 'sidv/diagramType' of https://github.com/mermaid-js/mermaid
Browse files Browse the repository at this point in the history
 into sidv/diagramType

* 'sidv/diagramType' of https://github.com/mermaid-js/mermaid:
  Update docs
  Update packages/mermaid/src/docs/config/usage.md
  • Loading branch information
sidharthv96 committed Dec 8, 2023
2 parents b8470a4 + 4588039 commit edf3291
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/config/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,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
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 edf3291

Please sign in to comment.