@drghaliasri/butex 8.0.2 → 8.0.3

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.
@@ -10411,9 +10411,13 @@ function digitsMappingFromDigitForm(digitForm) {
10411
10411
  }
10412
10412
  return "arabicdigits";
10413
10413
  }
10414
+ function editorMathLatexForCompile(token) {
10415
+ const source = token.math && token.sourceSide === "arabic" && token.source.includes("\\begin{cases}") ? mathTokenSourceForSide(token, "arabic", void 0, true) : token.source;
10416
+ return mirrorBuTeXOperatorsInTex(source, { target: "compile" });
10417
+ }
10414
10418
  function mathBodyLatex(token) {
10415
10419
  if (token.sourceOwner === "editor") {
10416
- return stripDisplayMathDelimiters(mirrorBuTeXOperatorsInTex(token.source, { target: "compile" }));
10420
+ return stripDisplayMathDelimiters(editorMathLatexForCompile(token));
10417
10421
  }
10418
10422
  if (!token.math || token.sourceOwner === "raw") {
10419
10423
  return stripDisplayMathDelimiters(token.source);
@@ -10488,7 +10492,7 @@ ${body}
10488
10492
  \\end{equation}`;
10489
10493
  }
10490
10494
  if (token.sourceOwner === "editor") {
10491
- return mirrorBuTeXOperatorsInTex(token.source, { target: "compile" });
10495
+ return editorMathLatexForCompile(token);
10492
10496
  }
10493
10497
  if (!token.math || token.sourceOwner === "raw") {
10494
10498
  return token.source;