🐛 Fix: fix copy link encoding bug

ISSUES CLOSED: #731
This commit is contained in:
PiEgg
2023-03-25 11:54:25 +08:00
parent 455cb4937e
commit 34657ae1fa
+1 -2
View File
@@ -1,5 +1,4 @@
import { IPasteStyle } from '#/types/enum'
import { handleUrlEncode } from '#/utils/common'
const formatCustomLink = (customLink: string, item: ImgInfo) => {
const fileName = item.fileName!.replace(new RegExp(`\\${item.extname}$`), '')
@@ -21,7 +20,7 @@ const formatCustomLink = (customLink: string, item: ImgInfo) => {
}
export default (style: IPasteStyle, item: ImgInfo, customLink: string | undefined) => {
const url = handleUrlEncode(item.url || item.imgUrl)
const url = item.url || item.imgUrl
const _customLink = customLink || '$url'
const tpl = {
markdown: `![](${url})`,