ソースを参照

fix typo in regex

Mike L 2 年 前
コミット
9c2526ba99
2 ファイル変更2 行追加2 行削除
  1. 1 1
      dist/koishi.js
  2. 1 1
      src/koishi.ts

+ 1 - 1
dist/koishi.js

@@ -22,7 +22,7 @@ exports.Message = {
     Voice: koishi_1.segment.audio,
     separateAttachment: (msg) => {
         const attachments = [];
-        const message = msg.replace(/<(video|record) *?\/>/g, code => {
+        const message = msg.replace(/<(video|record) .*?\/>/g, code => {
             attachments.push(code);
             return '';
         });

+ 1 - 1
src/koishi.ts

@@ -24,7 +24,7 @@ export const Message = {
   Voice: segment.audio,
   separateAttachment: (msg: string) => {
     const attachments: string[] = [];
-    const message = msg.replace(/<(video|record) *?\/>/g, code => {
+    const message = msg.replace(/<(video|record) .*?\/>/g, code => {
       attachments.push(code);
       return '';
     });