support tiff image
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export function fileType(url: string) {
|
||||
if (url.match(/\.(jpg|jpeg|gif|png|webp|avif)$/)) {
|
||||
if (url.match(/\.(jpg|jpeg|gif|png|webp|avif|tiff)$/)) {
|
||||
return 'image';
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export function parser(content: string) {
|
||||
const url = new URL(word);
|
||||
url.search = '';
|
||||
|
||||
if (url.pathname.match(/\.(jpg|jpeg|gif|png|webp|avif)$/)) {
|
||||
if (url.pathname.match(/\.(jpg|jpeg|gif|png|webp|avif|tiff)$/)) {
|
||||
// image url
|
||||
richContent.images.push(word);
|
||||
// remove url from original content
|
||||
|
||||
Reference in New Issue
Block a user