fix: better handling for responsive images (#312)
parent
785a22245f
commit
0940971069
@ -1,4 +1,6 @@
|
|||||||
export const IS_LINK = new RegExp('https?://', 'i');
|
export const IS_LINK = new RegExp('https?://', 'i');
|
||||||
export const IS_IMAGE = new RegExp('.(png|gif|jpe?g)', 'i');
|
const IMAGE_RE = '.(png|gif|jpe?g)';
|
||||||
|
export const IS_IMAGE = new RegExp(`${IMAGE_RE}`, 'i');
|
||||||
|
export const IS_SRCSET = new RegExp(`${IMAGE_RE}(\\s*[\\d.]+[wx])`, 'i');
|
||||||
|
|
||||||
export const TAGS_TO_REMOVE = ['script', 'style', 'form'].join(',');
|
export const TAGS_TO_REMOVE = ['script', 'style', 'form'].join(',');
|
||||||
|
Loading…
Reference in New Issue