@braze/sanity-plugin-ai-translation 0.2.63 → 0.2.64

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/index.js CHANGED
@@ -1682,7 +1682,24 @@ const globalTransformRegistry = new TransformRegistry(), callGPT5 = async (apiKe
1682
1682
  parent && parent.children.push(node);
1683
1683
  } else
1684
1684
  root.push(node);
1685
- else if (attributes.type === "string" && !content) {
1685
+ else if (attributes.type === "string" && content && !content.includes(closingTag)) {
1686
+ const contentLines = [content];
1687
+ for (i++; i < lines.length; ) {
1688
+ const currentLine = lines[i];
1689
+ if (currentLine.includes(closingTag)) {
1690
+ const closingIndex = currentLine.indexOf(closingTag), remainingContent = currentLine.substring(0, closingIndex);
1691
+ remainingContent && contentLines.push(remainingContent);
1692
+ break;
1693
+ }
1694
+ contentLines.push(currentLine), i++;
1695
+ }
1696
+ if (node.text = unescapeXml(contentLines.join(`
1697
+ `)), stack.length > 0) {
1698
+ const parent = stack[stack.length - 1];
1699
+ parent && parent.children.push(node);
1700
+ } else
1701
+ root.push(node);
1702
+ } else if (attributes.type === "string" && !content) {
1686
1703
  const contentLines = [];
1687
1704
  for (i++; i < lines.length; ) {
1688
1705
  const currentLine = lines[i];