From 3fc74490de1a8a91d88304071e413389c81e3355 Mon Sep 17 00:00:00 2001 From: boojack Date: Thu, 16 Dec 2021 22:51:44 +0800 Subject: [PATCH] feat: shorten image url length --- web/src/components/Editor/Editor.tsx | 4 ++-- web/src/helpers/consts.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/Editor/Editor.tsx b/web/src/components/Editor/Editor.tsx index fe45188f..c60d6f71 100644 --- a/web/src/components/Editor/Editor.tsx +++ b/web/src/components/Editor/Editor.tsx @@ -73,8 +73,8 @@ const Editor = forwardRef((props: Props, ref: React.ForwardedRef']+)/g; // 图片 正则 -export const IMAGE_URL_REG = /(https?:\/\/[^\s<\\*>']+\.(jpeg|jpg|gif|png|svg))/g; +export const IMAGE_URL_REG = /([^\s<\\*>']+\.(jpeg|jpg|gif|png|svg))/g; // memo 关联正则 export const MEMO_LINK_REG = /\[@(.+?)\]\((.+?)\)/g;