فهرست منبع

fix is attachment link

ryoji-s 2 سال پیش
والد
کامیت
35bfbbad8a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      apps/app/src/services/renderer/remark-plugins/attachment.ts

+ 1 - 1
apps/app/src/services/renderer/remark-plugins/attachment.ts

@@ -10,7 +10,7 @@ const SUPPORTED_ATTRIBUTES = ['attachmentId', 'url', 'attachmentName'];
 const isAttachmentLink = (url: string) => {
   // https://regex101.com/r/9qZhiK/1
   const attachmentUrlFormat = new RegExp(/^\/(attachment)\/([^/^\n]+)$/);
-  return url.match(attachmentUrlFormat);
+  return attachmentUrlFormat.test(url);
 };
 
 const rewriteNode = (node: Node) => {