From c82b1cee8ef6e763778c4e3c02d3501abd7c644d Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Fri, 17 Sep 2021 18:39:44 -0700 Subject: [PATCH] Update usage.md --- docs/usage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index ff4b1dab1..d6665677b 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -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.