ryoji-s 2 лет назад
Родитель
Сommit
22253d2761
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

@@ -7,7 +7,7 @@ import { visit } from 'unist-util-visit';
 
 
 const SUPPORTED_ATTRIBUTES = ['attachmentId', 'url', 'attachmentName'];
 const SUPPORTED_ATTRIBUTES = ['attachmentId', 'url', 'attachmentName'];
 
 
-const isAttachmentLink = (url: string) => {
+const isAttachmentLink = (url: string): boolean => {
   // https://regex101.com/r/9qZhiK/1
   // https://regex101.com/r/9qZhiK/1
   const attachmentUrlFormat = new RegExp(/^\/(attachment)\/([^/^\n]+)$/);
   const attachmentUrlFormat = new RegExp(/^\/(attachment)\/([^/^\n]+)$/);
   return attachmentUrlFormat.test(url);
   return attachmentUrlFormat.test(url);