diff --git a/website/guide/api-usage/js-api.md b/website/guide/api-usage/js-api.md index 379bc662..89f37238 100644 --- a/website/guide/api-usage/js-api.md +++ b/website/guide/api-usage/js-api.md @@ -285,7 +285,7 @@ const newSource = node.commitEdits([edit]) Note, `console.error($A)` will not generate `console.error('hello world')` in JavaScript API unlike the CLI. This is because using the host language to generate the replacement string is more flexible. :::warning -Metavariable will not be replaced in the `replace` method. You need to create a string using `get_match(var_name)` by using JavaScript. +Metavariable will not be replaced in the `replace` method. You need to create a string using `getMatch(var_name)` by using JavaScript. ::: See also [ast-grep#1172](https://github.com/ast-grep/ast-grep/issues/1172)