mirror of
https://github.com/postlight/mercury-parser
synced 2024-11-17 03:25:31 +00:00
feat: pulling score from whitelist
This commit is contained in:
parent
94321111e9
commit
3b87b557be
@ -18,7 +18,7 @@ export const STRIP_OUTPUT_TAGS = [
|
|||||||
export const REMOVE_ATTRS = ['style', 'align'];
|
export const REMOVE_ATTRS = ['style', 'align'];
|
||||||
export const REMOVE_ATTR_SELECTORS = REMOVE_ATTRS.map(selector => `[${selector}]`);
|
export const REMOVE_ATTR_SELECTORS = REMOVE_ATTRS.map(selector => `[${selector}]`);
|
||||||
export const REMOVE_ATTR_LIST = REMOVE_ATTRS.join(',');
|
export const REMOVE_ATTR_LIST = REMOVE_ATTRS.join(',');
|
||||||
export const WHITELIST_ATTRS = ['src', 'srcset', 'href', 'class', 'id', 'alt', 'score'];
|
export const WHITELIST_ATTRS = ['src', 'srcset', 'href', 'class', 'id', 'alt'];
|
||||||
export const WHITELIST_ATTRS_RE = new RegExp(`^(${WHITELIST_ATTRS.join('|')})$`, 'i');
|
export const WHITELIST_ATTRS_RE = new RegExp(`^(${WHITELIST_ATTRS.join('|')})$`, 'i');
|
||||||
|
|
||||||
// removeEmpty
|
// removeEmpty
|
||||||
|
Loading…
Reference in New Issue
Block a user