add camel case svg element tag names to tag map
This commit is contained in:
@@ -9,6 +9,43 @@ import {
|
|||||||
|
|
||||||
const tagMap: tagMap = {
|
const tagMap: tagMap = {
|
||||||
script: 'noscript',
|
script: 'noscript',
|
||||||
|
// camel case svg element tag names
|
||||||
|
altglyph: 'altGlyph',
|
||||||
|
altglyphdef: 'altGlyphDef',
|
||||||
|
altglyphitem: 'altGlyphItem',
|
||||||
|
animatecolor: 'animateColor',
|
||||||
|
animatemotion: 'animateMotion',
|
||||||
|
animatetransform: 'animateTransform',
|
||||||
|
clippath: 'clipPath',
|
||||||
|
feblend: 'feBlend',
|
||||||
|
fecolormatrix: 'feColorMatrix',
|
||||||
|
fecomponenttransfer: 'feComponentTransfer',
|
||||||
|
fecomposite: 'feComposite',
|
||||||
|
feconvolvematrix: 'feConvolveMatrix',
|
||||||
|
fediffuselighting: 'feDiffuseLighting',
|
||||||
|
fedisplacementmap: 'feDisplacementMap',
|
||||||
|
fedistantlight: 'feDistantLight',
|
||||||
|
fedropshadow: 'feDropShadow',
|
||||||
|
feflood: 'feFlood',
|
||||||
|
fefunca: 'feFuncA',
|
||||||
|
fefuncb: 'feFuncB',
|
||||||
|
fefuncg: 'feFuncG',
|
||||||
|
fefuncr: 'feFuncR',
|
||||||
|
fegaussianblur: 'feGaussianBlur',
|
||||||
|
feimage: 'feImage',
|
||||||
|
femerge: 'feMerge',
|
||||||
|
femergenode: 'feMergeNode',
|
||||||
|
femorphology: 'feMorphology',
|
||||||
|
feoffset: 'feOffset',
|
||||||
|
fepointlight: 'fePointLight',
|
||||||
|
fespecularlighting: 'feSpecularLighting',
|
||||||
|
fespotlight: 'feSpotLight',
|
||||||
|
fetile: 'feTile',
|
||||||
|
feturbulence: 'feTurbulence',
|
||||||
|
foreignobject: 'foreignObject',
|
||||||
|
glyphref: 'glyphRef',
|
||||||
|
lineargradient: 'linearGradient',
|
||||||
|
radialgradient: 'radialGradient',
|
||||||
};
|
};
|
||||||
function getTagName(n: elementNode): string {
|
function getTagName(n: elementNode): string {
|
||||||
let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;
|
let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;
|
||||||
|
|||||||
Reference in New Issue
Block a user