@builder.io/mitosis 0.0.56-85 → 0.0.56-89
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.
|
@@ -47,7 +47,7 @@ var blockToLit = function (json, options) {
|
|
|
47
47
|
return "${".concat(processBinding((_d = json.bindings.when) === null || _d === void 0 ? void 0 : _d.code), " ?\n html`").concat(json.children
|
|
48
48
|
.filter(filter_empty_text_nodes_1.filterEmptyTextNodes)
|
|
49
49
|
.map(function (item) { return blockToLit(item, options); })
|
|
50
|
-
.join('\n'), "`\n : ").concat(!json.meta.else ? 'null' : blockToLit(json.meta.else, options), "}");
|
|
50
|
+
.join('\n'), "`\n : ").concat(!json.meta.else ? 'null' : "html`".concat(blockToLit(json.meta.else, options), "`"), "}");
|
|
51
51
|
}
|
|
52
52
|
var str = '';
|
|
53
53
|
var tagName = (0, is_upper_case_1.isUpperCase)(json.name[0]) ? (0, dash_case_1.dashCase)(json.name) : json.name;
|
|
@@ -221,7 +221,7 @@ var componentToMarko = function (userOptions) {
|
|
|
221
221
|
// Convert on-click=(...) -> on-click(...)
|
|
222
222
|
.replace(/(on-[a-z]+)=\(/g, function (_match, group) { return group + '('; })
|
|
223
223
|
// Fix a weird edge case where </if> becomes </if \n > which is invalid in marko
|
|
224
|
-
.replace(/<\/([a-z]+)\s+>/
|
|
224
|
+
.replace(/<\/([a-z]+)\s+>/gi, '</$1>');
|
|
225
225
|
var finalStr = "\n".concat(jsString, "\n").concat(cssString, "\n").concat(htmlString, "\n ")
|
|
226
226
|
.replace(/\n{3,}/g, '\n\n')
|
|
227
227
|
.trim();
|