marko 6.0.0-next.3.55 → 6.0.0-next.3.56

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.
@@ -1172,7 +1172,7 @@ function startSection(path5) {
1172
1172
  function getOrCreateSection(path5) {
1173
1173
  let cur = path5;
1174
1174
  while (true) {
1175
- if (cur.type === "Program" || cur.type === "MarkoTagBody" && !cur.node.attributeTags && analyzeTagNameType(cur.parentPath) !== 0 /* NativeTag */ && cur.parent.name.value !== "html-comment") {
1175
+ if (cur.type === "Program" || cur.type === "MarkoTagBody" && !cur.node.attributeTags && !isNativeNode(cur.parentPath)) {
1176
1176
  return startSection(cur);
1177
1177
  }
1178
1178
  cur = cur.parentPath;
@@ -1331,6 +1331,19 @@ function getCommonSection(section, other) {
1331
1331
  }
1332
1332
  throw new Error("No common section");
1333
1333
  }
1334
+ function isNativeNode(tag) {
1335
+ if (isCoreTag(tag)) {
1336
+ switch (tag.node.name.value) {
1337
+ case "html-comment":
1338
+ case "html-script":
1339
+ case "html-style":
1340
+ return true;
1341
+ default:
1342
+ return false;
1343
+ }
1344
+ }
1345
+ return analyzeTagNameType(tag) === 0 /* NativeTag */;
1346
+ }
1334
1347
 
1335
1348
  // src/translator/visitors/program/dom.ts
1336
1349
  var import_compiler18 = require("@marko/compiler");
@@ -7779,7 +7792,7 @@ var let_default = {
7779
7792
  return import_compiler41.types.callExpression(signal.identifier, [scope, value]);
7780
7793
  };
7781
7794
  } else {
7782
- translateVar(tag, valueAttr.value);
7795
+ translateVar(tag, valueAttr.value, "let");
7783
7796
  if (valueChangeAttr) {
7784
7797
  setSerializedProperty(
7785
7798
  section,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.0-next.3.55",
3
+ "version": "6.0.0-next.3.56",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",