mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-18 11:13:30 +00:00
support tiff image
This commit is contained in:
parent
2f8aa66ff6
commit
c8d04f4695
@ -1,5 +1,5 @@
|
|||||||
export function fileType(url: string) {
|
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';
|
return 'image';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ export function parser(content: string) {
|
|||||||
const url = new URL(word);
|
const url = new URL(word);
|
||||||
url.search = '';
|
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
|
// image url
|
||||||
richContent.images.push(word);
|
richContent.images.push(word);
|
||||||
// remove url from original content
|
// remove url from original content
|
||||||
|
Loading…
Reference in New Issue
Block a user