@@ -87,7 +87,6 @@ function element(node, context) {
8787 var parentSchema = context . schema
8888 var schema = parentSchema
8989 var props = node . properties || { }
90- var name = node . tagName . toLowerCase ( )
9190 var attributes = [ ]
9291 var children
9392 var info
@@ -96,7 +95,7 @@ function element(node, context) {
9695 var cssProp
9796 var cssProperties
9897
99- if ( parentSchema . space === 'html' && name === 'svg' ) {
98+ if ( parentSchema . space === 'html' && node . tagName . toLowerCase ( ) === 'svg' ) {
10099 schema = svg
101100 context . schema = schema
102101 }
@@ -129,7 +128,7 @@ function element(node, context) {
129128 }
130129
131130 if ( prop === 'style' && typeof value === 'string' ) {
132- value = parseStyle ( value , name )
131+ value = parseStyle ( value , node . tagName )
133132 }
134133
135134 if ( value === true ) {
@@ -182,7 +181,7 @@ function element(node, context) {
182181 // Restore parent schema.
183182 context . schema = parentSchema
184183
185- return createJsxElement ( node , name , attributes , children )
184+ return createJsxElement ( node , node . tagName , attributes , children )
186185}
187186
188187function mdxjsEsm ( node , context ) {
0 commit comments