We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afd7d6c commit 0779f6eCopy full SHA for 0779f6e
lua/auxCode_filter.lua
@@ -6,6 +6,10 @@
6
7
local AuxFilter = {}
8
9
+local function alt_lua_punc( s )
10
+ return s:gsub( '([%.%+%-%*%?%[%]%^%$%(%)%%])', '%%%1' )
11
+end
12
+
13
-- 日志模块
14
-- local log = require 'log'
15
-- log.outfile = "aux_code.log"
@@ -20,6 +24,9 @@ function AuxFilter.init(env)
20
24
21
25
-- 設定預設觸發鍵為分號,並從配置中讀取自訂的觸發鍵
22
26
env.trigger_key = config:get_string("axu_code/trigger_word") or ";"
27
+ -- 对内容进行替换
28
+ env.trigger_key = alt_lua_punc( env.trigger_key )
29
23
30
-- 设定是否显示辅助码,默认为显示
31
env.show_aux_notice = config:get_string("axu_code/show_aux_notice") or 'always'
32
0 commit comments