From 262dc5729a28b2bad0b6413d4eab2290d14395cf Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 8 May 2024 17:50:10 -0300 Subject: Details Corrections in comments and manual. Added note in the manual about local variables in the REPL. --- testes/pm.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testes') diff --git a/testes/pm.lua b/testes/pm.lua index 44454dff..f5889fcd 100644 --- a/testes/pm.lua +++ b/testes/pm.lua @@ -56,7 +56,8 @@ assert(f(" \n\r*&\n\r xuxu \n\n", "%g%g%g+") == "xuxu") -- Adapt a pattern to UTF-8 local function PU (p) - -- break '?' into each individual byte of a character + -- distribute '?' into each individual byte of a character. + -- (For instance, "รก?" becomes "\195?\161?".) p = string.gsub(p, "(" .. utf8.charpattern .. ")%?", function (c) return string.gsub(c, ".", "%0?") end) -- cgit v1.2.3-55-g6feb