opt: optimize markdown image parser, identify image and blockquote tags

This commit is contained in:
RockYang
2024-01-16 10:13:00 +08:00
parent bd057a4cc9
commit 36a2626ccc
4 changed files with 33 additions and 10 deletions

View File

@@ -161,3 +161,8 @@ export function substr(str, length) {
return result
}
export function isImage(url) {
const expr = /\.(jpg|jpeg|png|gif|bmp|svg)$/i;
return expr.test(url);
}