summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/data/button_char.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/data/button_char.lua')
-rw-r--r--plugins/data/button_char.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/data/button_char.lua b/plugins/data/button_char.lua
index cee756c2603..02c64d9673c 100644
--- a/plugins/data/button_char.lua
+++ b/plugins/data/button_char.lua
@@ -236,9 +236,9 @@ local convert_text =
}
local function convert_char(str)
- str = str:gsub("@([a-zA-Z%-]+)", function(s) if convert_text[s] then return utf8.char(convert_text[s] + 0xe000) end return s end)
- str = str:gsub("_(.)", function(s) if default_text[s] then return utf8.char(default_text[s] + 0xe000) end return s end)
- str = str:gsub("%^(.)", function(s) if expand_text[s] then return utf8.char(expand_text[s] + 0xe000) end return s end)
+ str = str:gsub("@(%g+)", function(s) if convert_text[s] then return utf8.char(convert_text[s] + 0xe000) end return s end)
+ str = str:gsub("_(%g)", function(s) if default_text[s] then return utf8.char(default_text[s] + 0xe000) end return s end)
+ str = str:gsub("%^(%g)", function(s) if expand_text[s] then return utf8.char(expand_text[s] + 0xe000) end return s end)
return str
end