marko 6.3.22 → 6.3.23

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.
@@ -4658,8 +4658,12 @@ var native_tag_default = {
4658
4658
  flushInto(tag);
4659
4659
  tag.insertBefore(_marko_compiler.types.expressionStatement(callRuntime("_attr_select_value", getScopeIdIdentifier(tagSection), nodeBinding && getScopeAccessorLiteral(nodeBinding), selectArgs.value, selectArgs.valueChange, _marko_compiler.types.arrowFunctionExpression([], _marko_compiler.types.blockStatement(tag.node.body.body)), selectArgs.serializeType)));
4660
4660
  } else if (isTextOnly) {
4661
- for (const child of tag.node.body.body) if (_marko_compiler.types.isMarkoText(child)) write`${child.value}`;
4662
- else if (_marko_compiler.types.isMarkoPlaceholder(child)) write`${callRuntime(getTextOnlyEscapeHelper(tagName), child.value)}`;
4661
+ const rawTextHelper = getRawTextEscapeHelper(tagName);
4662
+ if (rawTextHelper) {
4663
+ const body = bodyToTextLiteral(tag.node.body);
4664
+ write`${_marko_compiler.types.isStringLiteral(body) ? getHTMLRuntime()[rawTextHelper](body.value) : callRuntime(rawTextHelper, body)}`;
4665
+ } else for (const child of tag.node.body.body) if (_marko_compiler.types.isMarkoText(child)) write`${child.value}`;
4666
+ else if (_marko_compiler.types.isMarkoPlaceholder(child)) write`${callRuntime("_escape", child.value)}`;
4663
4667
  } else tag.insertBefore(tag.node.body.body).forEach((child) => child.skip());
4664
4668
  if (!tagExtra[kSkipEndTag] && !isOpenOnly && !selectArgs) {
4665
4669
  if (tagName === "head" && getMarkoOpts().linkAssets) write`${callRuntime("_flush_head")}`;
@@ -5005,11 +5009,10 @@ function assertOptionInSelectWithValue(tag) {
5005
5009
  parent = parent.parentPath;
5006
5010
  }
5007
5011
  }
5008
- function getTextOnlyEscapeHelper(tagName) {
5012
+ function getRawTextEscapeHelper(tagName) {
5009
5013
  switch (tagName) {
5010
5014
  case "script": return "_escape_script";
5011
5015
  case "style": return "_escape_style";
5012
- default: return "_escape";
5013
5016
  }
5014
5017
  }
5015
5018
  function buildAttrExpression(value, serialize, dynamic) {
@@ -9188,7 +9191,7 @@ function isStaticText(node) {
9188
9191
  }
9189
9192
  function getPrevStaticSibling(path) {
9190
9193
  let prev = path.getPrevSibling();
9191
- while (prev.node && (prev.isMarkoComment() || prev.isMarkoPlaceholder() && isEmptyPlaceholder(prev.node))) prev = prev.getPrevSibling();
9194
+ while (prev.node && (getNodeContentType(prev, "endType") === null || prev.isMarkoPlaceholder() && isEmptyPlaceholder(prev.node))) prev = prev.getPrevSibling();
9192
9195
  return prev.node;
9193
9196
  }
9194
9197
  function isEmptyPlaceholder(placeholder) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.3.22",
3
+ "version": "6.3.23",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
@@ -48,14 +48,14 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@marko/compiler": "^5.41.8",
51
+ "@marko/compiler": "^5.41.9",
52
52
  "csstype": "^3.2.3",
53
53
  "fastest-levenshtein": "^1.0.16",
54
54
  "magic-string": "^0.30.21"
55
55
  },
56
56
  "devDependencies": {
57
- "@marko/runtime-tags": "npm:marko@6.3.22",
58
- "marko": "5.39.27"
57
+ "@marko/runtime-tags": "npm:marko@6.3.23",
58
+ "marko": "5.39.28"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=22"