Update usage.md

This commit is contained in:
Neil Cuzon 2021-09-17 18:39:44 -07:00 committed by GitHub
parent 0d91eee5e0
commit c82b1cee8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -292,14 +292,14 @@ module.exports = (options) ->
## Advanced usage
**Error handling**
**Syntax validation**
When the parser encounters invalid syntax the **mermaid.parseError** function is called. It is possible to override this
function in order to handle the error in an application-specific way.
**Parsing text without rendering**
It is also possible to validate the syntax before rendering in order to streamline the user experience. The function
To validate syntax before rendering in order to streamline the user experience. The function
**mermaid.parse(txt)** takes a text string as an argument and returns true if the text is syntactically correct and
false if it is not. The parseError function will be called when the parse function returns false.