Skip to content

Commit 37e06ab

Browse files
committed
feat: can use $0 get input value
1 parent 66ac5f7 commit 37e06ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/webgal/src/Core/gameScripts/getUserInput

packages/webgal/src/Core/gameScripts/getUserInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const getUserInput = (sentence: ISentence): IPerform => {
4747
if (rule) {
4848
const reg = tryToRegex(rule, ruleFlag);
4949
if (reg && !reg.test(userInput.value)) {
50-
if (ruleText) alert(ruleText);
50+
if (ruleText) alert(ruleText.replaceAll(/\$0/g, userInput.value));
5151
return;
5252
}
5353
if (!reg) {

0 commit comments

Comments
 (0)