marko 6.0.0-next.3.81 → 6.0.0-next.3.82
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/translator/index.js +9 -8
- package/package.json +1 -1
package/dist/translator/index.js
CHANGED
@@ -829,6 +829,9 @@ function getContentInfo(path5) {
|
|
829
829
|
const endType = getNodeContentType(body[endIndex], "endType", contentInfo);
|
830
830
|
if (endType !== null) {
|
831
831
|
contentInfo.endType = endType;
|
832
|
+
if (endType === 1 /* Dynamic */) {
|
833
|
+
contentInfo.singleChild = false;
|
834
|
+
}
|
832
835
|
for (let startIndex = 0; startIndex < endIndex; startIndex++) {
|
833
836
|
const startType = getNodeContentType(body[startIndex], "startType");
|
834
837
|
if (startType !== null) {
|
@@ -9796,14 +9799,12 @@ var dynamic_tag_default = {
|
|
9796
9799
|
isClassAPI ? "renderBody" : "content"
|
9797
9800
|
);
|
9798
9801
|
const args = [];
|
9799
|
-
let
|
9800
|
-
if (node.arguments
|
9802
|
+
let hasTagArgs = false;
|
9803
|
+
if (node.arguments) {
|
9804
|
+
hasTagArgs = true;
|
9801
9805
|
args.push(...node.arguments);
|
9802
9806
|
if (properties.length) {
|
9803
|
-
hasMultipleArgs = true;
|
9804
9807
|
args.push(propsToExpression(properties));
|
9805
|
-
} else {
|
9806
|
-
hasMultipleArgs = node.arguments.length > 1 || import_compiler57.types.isSpreadElement(node.arguments[0]);
|
9807
9808
|
}
|
9808
9809
|
} else {
|
9809
9810
|
const contentProp = getTranslatedBodyContentProperty(properties);
|
@@ -9818,7 +9819,7 @@ var dynamic_tag_default = {
|
|
9818
9819
|
flushInto(tag);
|
9819
9820
|
writeHTMLResumeStatements(tag.get("body"));
|
9820
9821
|
const serializeReason = isClassAPI || !!node.var || getDynamicSourcesForExtra(tagExtra);
|
9821
|
-
const dynamicTagExpr =
|
9822
|
+
const dynamicTagExpr = hasTagArgs ? callRuntime(
|
9822
9823
|
"dynamicTag",
|
9823
9824
|
getScopeIdIdentifier(section),
|
9824
9825
|
getScopeAccessorLiteral(nodeRef2),
|
@@ -9906,11 +9907,11 @@ var dynamic_tag_default = {
|
|
9906
9907
|
getScopeAccessorLiteral(nodeRef2),
|
9907
9908
|
bodySection && import_compiler57.types.identifier(bodySection.name),
|
9908
9909
|
tagVarSignal ? import_compiler57.types.arrowFunctionExpression([], tagVarSignal.identifier) : void 0,
|
9909
|
-
|
9910
|
+
hasTagArgs && import_compiler57.types.numericLiteral(1)
|
9910
9911
|
);
|
9911
9912
|
};
|
9912
9913
|
if (args.length) {
|
9913
|
-
const argsOrInput =
|
9914
|
+
const argsOrInput = hasTagArgs ? import_compiler57.types.arrayExpression(args) : args[0];
|
9914
9915
|
if (!import_compiler57.types.isObjectExpression(argsOrInput) || argsOrInput.properties.length) {
|
9915
9916
|
signal.extraArgs = [
|
9916
9917
|
import_compiler57.types.arrowFunctionExpression(
|