You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git a/packages/match-test-replace/src/match-test-replace.ts b/packages/match-test-replace/src/match-test-replace.ts
index 0347700..10ca9a8 100644
--- a/packages/match-test-replace/src/match-test-replace.ts+++ b/packages/match-test-replace/src/match-test-replace.ts@@ -15,6 +15,8 @@ export interface TestMatchReplaceReturnDict {
// match pattern
// if the result of match `pattern` is falsy, return { ok: false }
pattern: RegExp;
+ // sub match range+ match?: (args: PatternMatchDictArgs) => RegExp;
// test the result of match
// if the result of `test` is true, allow to replace if needed
test?: (args: PatternMatchDictArgs) => boolean;
@@ -130,6 +132,10 @@ export const matchTestReplace = (text: string, dict: TestMatchReplaceReturnDict)
captures,
all
};
+ if(typeof dict.match === "function"){+ dict.match(dictArgs);+ // re replace and test+ }
if (typeof dict.test === "function") {
isReplaceOK = dict.test(dictArgs);
}
Currently, first match range is final range.
We want to change the range at runtime.
The text was updated successfully, but these errors were encountered: