Merge branch 'master' into release

This commit is contained in:
Jay 2018-08-21 15:10:04 +08:00
commit cbc21a743b

View File

@ -73,6 +73,7 @@ const parseCMD = async (text = '', source = {}) => {
let txt = '' let txt = ''
console.log('obj ::: ', obj) console.log('obj ::: ', obj)
for (let i of obj) { for (let i of obj) {
i.key = i.key.replace(/(\+|\[|\]|\*|\$|\^|\(|\))/g, '\\$1')
txt += (txt.length > 0 ? '|' : '') + i.key txt += (txt.length > 0 ? '|' : '') + i.key
} }
regex = new RegExp(`^(${txt})$`) regex = new RegExp(`^(${txt})$`)