@embeddables/cli 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler/reverse.js +5 -5
- package/package.json +1 -1
package/dist/compiler/reverse.js
CHANGED
|
@@ -1218,16 +1218,16 @@ function htmlToJSXChildren(html, indent) {
|
|
|
1218
1218
|
if (!attrMatch[0].includes('=')) {
|
|
1219
1219
|
continue;
|
|
1220
1220
|
}
|
|
1221
|
-
//
|
|
1222
|
-
// Normalize classname (wrong serialization) to
|
|
1221
|
+
// In CustomHTML we emit HTML-like attribute names (class, for, tabindex) so the
|
|
1222
|
+
// TSX matches the serialized HTML. Normalize classname (wrong serialization) to class.
|
|
1223
1223
|
let jsxAttrName = attrName;
|
|
1224
1224
|
const attrLower = attrName.toLowerCase();
|
|
1225
1225
|
if (attrLower === 'class' || attrLower === 'classname')
|
|
1226
|
-
jsxAttrName = '
|
|
1226
|
+
jsxAttrName = 'class';
|
|
1227
1227
|
else if (attrLower === 'for')
|
|
1228
|
-
jsxAttrName = '
|
|
1228
|
+
jsxAttrName = 'for';
|
|
1229
1229
|
else if (attrLower === 'tabindex')
|
|
1230
|
-
jsxAttrName = '
|
|
1230
|
+
jsxAttrName = 'tabindex';
|
|
1231
1231
|
// Handle style attribute: convert CSS string to JSX object
|
|
1232
1232
|
if (attrName === 'style' && attrValue) {
|
|
1233
1233
|
const styleObj = cssStringToStyleObject(attrValue);
|