UNPKG

html-dom-parser

Version:
46 lines (44 loc) 928 B
/** * SVG elements are case-sensitive. * * @see https://developer.mozilla.org/docs/Web/SVG/Element#svg_elements_a_to_z */ export const CASE_SENSITIVE_TAG_NAMES = [ 'animateMotion', 'animateTransform', 'clipPath', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'foreignObject', 'linearGradient', 'radialGradient', 'textPath', ] as const; export const CASE_SENSITIVE_TAG_NAMES_MAP = CASE_SENSITIVE_TAG_NAMES.reduce< Record<string, string> >((accumulator, tagName) => { accumulator[tagName.toLowerCase()] = tagName; return accumulator; }, {});