From ef2f1020c7168280f827368a05bd781ca496094e Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sat, 1 Oct 2022 19:31:46 +0200 Subject: [PATCH] Add utf8.charpattern --- utf8.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utf8.lua b/utf8.lua index 76122bb..6d5b47c 100644 --- a/utf8.lua +++ b/utf8.lua @@ -42,4 +42,7 @@ function utf8.char(...) return table_concat(chars) end +-- Overly permissive pattern that greedily matches a single UTF-8 codepoint +utf8.charpattern = "[%z-\127\194-\253][\128-\191]*" + return utf8 \ No newline at end of file