diff options
author | 2019-11-29 10:17:34 -0600 | |
---|---|---|
committer | 2019-11-29 10:18:50 -0600 | |
commit | b32f90e5a98f2d0087ccbbe628986b6df5283ef9 (patch) | |
tree | b12d82ce0972daca4002aff33bca58d4b71f992d /plugins/data/button_char.lua | |
parent | 35a1da30f1b8c2462bd17467bfae6886efe293bd (diff) |
plugins/data: small cleanups (nw)
Diffstat (limited to 'plugins/data/button_char.lua')
-rw-r--r-- | plugins/data/button_char.lua | 6 |
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 |