From 850fc8fbe1a777b12170ac90460b22afc10e9ad0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 3 Sep 2024 22:56:53 -0400 Subject: Clean up text replacement API to use backrefs instead of match_chain() --- test/text.tm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/text.tm') diff --git a/test/text.tm b/test/text.tm index d75a56a7..950805a9 100644 --- a/test/text.tm +++ b/test/text.tm @@ -227,11 +227,11 @@ func main(): >> $/$malicious/ = $/{1{}xxx}/ - >> "Hello":replace($/{lower}/, "(@)", $/@/) + >> "Hello":replace($/{lower}/, "(\0)") = "H(ello)" - >> " foo(xyz) foo(yyy) foo(z()) ":replace_chain([$/foo(/, $/?/, $/)/], ["baz[", "@", "]"], $/@/) - = " baz[xyz] baz[yyy] baz[z()] " + >> " foo(xyz) foo(yyy) foo(z()) ":replace($/foo(?)/, "baz(\1)") + = " baz(xyz) baz(yyy) baz(z()) " >> "":replace_all({$//:">"}) = "<tag>" -- cgit v1.2.3