Browse Source

type guard

ryoji-s 2 years ago
parent
commit
22253d2761
1 changed files with 1 additions and 1 deletions
  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 isAttachmentLink = (url: string) => {
+const isAttachmentLink = (url: string): boolean => {
   // https://regex101.com/r/9qZhiK/1
   const attachmentUrlFormat = new RegExp(/^\/(attachment)\/([^/^\n]+)$/);
   return attachmentUrlFormat.test(url);