Corrections in comments and manual. Added note in the manual about
local variables in the REPL.
This commit is contained in:
Roberto Ierusalimschy
2024-05-08 17:50:10 -03:00
parent 9d985db7bb
commit 262dc5729a
9 changed files with 36 additions and 21 deletions

View File

@@ -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)