chore: 移除部分无用代码
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m37s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m37s
This commit is contained in:
@ -18,17 +18,3 @@ export function renderMarkdown(content: string): string {
|
||||
|
||||
return dirtyHtml;
|
||||
}
|
||||
|
||||
export function convertMedia(content: string): string {
|
||||
// 通过正则表达式替换Markdown中的图片链接
|
||||
//  -> )
|
||||
|
||||
if (!content) return '';
|
||||
|
||||
const contentWithAbsoluteUrls = content.replace(
|
||||
/!\[([^\]]*)\]\((\/uploads\/[^)]+)\)/g,
|
||||
(_, alt, url) => `})`
|
||||
);
|
||||
|
||||
return contentWithAbsoluteUrls;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user