@karinjs/adapter-qqbot 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/core/index.js CHANGED
@@ -166,9 +166,7 @@ export class AdapterQQBot {
166
166
  const { regex } = Config.getBotConfig(this.account.uid) || { regex: [] };
167
167
  for (const r of regex) {
168
168
  const reg = r.reg;
169
- if (typeof reg !== 'string')
170
- continue;
171
- v = v.replace(reg, r.rep);
169
+ v = v.trim().replace(reg, r.rep);
172
170
  }
173
171
  elements.push(segment.text(v));
174
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karinjs/adapter-qqbot",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "author": "shijin",
5
5
  "type": "module",
6
6
  "description": "karin plugin template",