@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.
@@ -10374,9 +10374,13 @@ function digitsMappingFromDigitForm(digitForm) {
10374
10374
  }
10375
10375
  return "arabicdigits";
10376
10376
  }
10377
+ function editorMathLatexForCompile(token) {
10378
+ const source = token.math && token.sourceSide === "arabic" && token.source.includes("\\begin{cases}") ? mathTokenSourceForSide(token, "arabic", void 0, true) : token.source;
10379
+ return mirrorBuTeXOperatorsInTex(source, { target: "compile" });
10380
+ }
10377
10381
  function mathBodyLatex(token) {
10378
10382
  if (token.sourceOwner === "editor") {
10379
- return stripDisplayMathDelimiters(mirrorBuTeXOperatorsInTex(token.source, { target: "compile" }));
10383
+ return stripDisplayMathDelimiters(editorMathLatexForCompile(token));
10380
10384
  }
10381
10385
  if (!token.math || token.sourceOwner === "raw") {
10382
10386
  return stripDisplayMathDelimiters(token.source);
@@ -10451,7 +10455,7 @@ ${body}
10451
10455
  \\end{equation}`;
10452
10456
  }
10453
10457
  if (token.sourceOwner === "editor") {
10454
- return mirrorBuTeXOperatorsInTex(token.source, { target: "compile" });
10458
+ return editorMathLatexForCompile(token);
10455
10459
  }
10456
10460
  if (!token.math || token.sourceOwner === "raw") {
10457
10461
  return token.source;