@@ -87,7 +87,6 @@ function element(node, context) {
87
87
var parentSchema = context . schema
88
88
var schema = parentSchema
89
89
var props = node . properties || { }
90
- var name = node . tagName . toLowerCase ( )
91
90
var attributes = [ ]
92
91
var children
93
92
var info
@@ -96,7 +95,7 @@ function element(node, context) {
96
95
var cssProp
97
96
var cssProperties
98
97
99
- if ( parentSchema . space === 'html' && name === 'svg' ) {
98
+ if ( parentSchema . space === 'html' && node . tagName . toLowerCase ( ) === 'svg' ) {
100
99
schema = svg
101
100
context . schema = schema
102
101
}
@@ -129,7 +128,7 @@ function element(node, context) {
129
128
}
130
129
131
130
if ( prop === 'style' && typeof value === 'string' ) {
132
- value = parseStyle ( value , name )
131
+ value = parseStyle ( value , node . tagName )
133
132
}
134
133
135
134
if ( value === true ) {
@@ -182,7 +181,7 @@ function element(node, context) {
182
181
// Restore parent schema.
183
182
context . schema = parentSchema
184
183
185
- return createJsxElement ( node , name , attributes , children )
184
+ return createJsxElement ( node , node . tagName , attributes , children )
186
185
}
187
186
188
187
function mdxjsEsm ( node , context ) {
0 commit comments