diff options
author | Peng Wu <alexepico@gmail.com> | 2014-12-08 13:34:28 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-12-08 13:34:28 +0800 |
commit | 76d62fd53b46fe6935eec9c0eefe0617d5d7f0b7 (patch) | |
tree | 71a9dd69ffd08866275535a15a6e745ce32f943a /lua | |
parent | 8cba9ed83fe4d02b76e224862ca85ce014592b80 (diff) | |
download | ibus-libpinyin-76d62fd53b46fe6935eec9c0eefe0617d5d7f0b7.tar.gz ibus-libpinyin-76d62fd53b46fe6935eec9c0eefe0617d5d7f0b7.tar.xz ibus-libpinyin-76d62fd53b46fe6935eec9c0eefe0617d5d7f0b7.zip |
update base.lua for lua 5.2
Diffstat (limited to 'lua')
-rw-r--r-- | lua/base.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/base.lua b/lua/base.lua index 5aaf32f..200aea6 100644 --- a/lua/base.lua +++ b/lua/base.lua @@ -153,8 +153,8 @@ _MATH_KEYWORDS = { function _add_math_keyword(input) local ret = input for _, keyword in pairs(_MATH_KEYWORDS) do - ret = ret:gsub(string.format("([^%%a\.])(%s\(.-\))", keyword), "%1math\.%2") - ret = ret:gsub(string.format("^(%s\(.-\))", keyword), "math\.%1") + ret = ret:gsub(string.format("([^%%a\\.])(%s((.-)))", keyword), "%1math.%2") + ret = ret:gsub(string.format("^(%s((.-)))", keyword), "math.%1") end return ret end |