weml-monaco 0.4.3 → 0.4.4

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/CHANGELOG.md CHANGED
@@ -8,6 +8,14 @@ This package mirrors the language logic of the VS Code extension; entries below
8
8
  track the port catching up with the VS Code provider changes (see the root
9
9
  `CHANGELOG.md` for the extension).
10
10
 
11
+ ## [0.4.4] — 2026-09-07
12
+
13
+ Synced with VS Code extension `0.7.12`.
14
+
15
+ ### Fixed
16
+ - Preserve surrounding word separators in nested inline wrappers containing
17
+ sentence elements when applying canonical formatting.
18
+
11
19
  ## [0.4.3] — 2026-09-07
12
20
 
13
21
  Synced with VS Code extension `0.7.11`.
package/dist/index.cjs CHANGED
@@ -6356,15 +6356,15 @@ var require_wemlContentNormalizeV2 = __commonJS({
6356
6356
  }
6357
6357
  }
6358
6358
  function processInlineContainer(node) {
6359
- if (hasDirectSentChildren(node)) processSentContainer(node);
6359
+ if (hasDirectSentChildren(node)) processSentContainer(node, true);
6360
6360
  else processInlineContent(node, true);
6361
6361
  }
6362
- function processSentContainer(node) {
6362
+ function processSentContainer(node, trimEdges) {
6363
6363
  for (const child of [...node.childNodes]) {
6364
6364
  if (child.nodeType !== 1) continue;
6365
6365
  const name = child.rawTagName.toLowerCase();
6366
6366
  if (isInlineTextElement(child)) {
6367
- if (hasDirectSentChildren(child)) processSentContainer(child);
6367
+ if (hasDirectSentChildren(child)) processSentContainer(child, false);
6368
6368
  else processInlineContent(child, false);
6369
6369
  } else if (BLOCK_ELEMENTS.has(name)) {
6370
6370
  processBlockElement(child);
@@ -6388,7 +6388,7 @@ var require_wemlContentNormalizeV2 = __commonJS({
6388
6388
  if (next && next.nodeType === 3) next.rawText = trimStartWhitespace(next.rawText);
6389
6389
  }
6390
6390
  }
6391
- trimContainerEdges(node);
6391
+ if (trimEdges) trimContainerEdges(node);
6392
6392
  for (const child of [...node.childNodes]) {
6393
6393
  if (child.nodeType === 3 && child.rawText === "") child.remove();
6394
6394
  }
@@ -6410,7 +6410,7 @@ var require_wemlContentNormalizeV2 = __commonJS({
6410
6410
  if (child.nodeType !== 1) continue;
6411
6411
  const name = child.rawTagName.toLowerCase();
6412
6412
  if (isInlineTextElement(child)) {
6413
- if (hasDirectSentChildren(child)) processSentContainer(child);
6413
+ if (hasDirectSentChildren(child)) processSentContainer(child, false);
6414
6414
  else processInlineContent(child, false);
6415
6415
  } else if (BLOCK_ELEMENTS.has(name)) {
6416
6416
  processBlockElement(child);