diff --git a/docs/config/usage.md b/docs/config/usage.md index 1069ffa5f..0ab60012f 100644 --- a/docs/config/usage.md +++ b/docs/config/usage.md @@ -348,10 +348,10 @@ mermaid.parseError = function (err, hash) { displayErrorInGui(err); }; -const textFieldUpdated = function () { +const textFieldUpdated = async function () { const textStr = getTextFromFormField('code'); - if (mermaid.parse(textStr)) { + if (await mermaid.parse(textStr)) { reRender(textStr); } }; diff --git a/packages/mermaid/src/docs/config/usage.md b/packages/mermaid/src/docs/config/usage.md index 211a06af7..1c2b5a39b 100644 --- a/packages/mermaid/src/docs/config/usage.md +++ b/packages/mermaid/src/docs/config/usage.md @@ -345,10 +345,10 @@ mermaid.parseError = function (err, hash) { displayErrorInGui(err); }; -const textFieldUpdated = function () { +const textFieldUpdated = async function () { const textStr = getTextFromFormField('code'); - if (mermaid.parse(textStr)) { + if (await mermaid.parse(textStr)) { reRender(textStr); } };