From 2339bae218803dc73e3fdaa9f75ef6ea75f11c60 Mon Sep 17 00:00:00 2001 From: Soya <3100034521@qq.com> Date: Thu, 19 Dec 2024 19:42:52 +0800 Subject: [PATCH] typo: getMatch --- website/guide/api-usage/js-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)