temml 0.11.5 → 0.11.6

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/temml.cjs CHANGED
@@ -771,10 +771,12 @@ var mathMLTree = {
771
771
  // TODO: Remove when Chromium stretches \widetilde & \widehat
772
772
  const estimatedWidth = node => {
773
773
  let width = 0;
774
- if (node.body) {
774
+ if (node.body && Array.isArray(node.body)) {
775
775
  for (const item of node.body) {
776
776
  width += estimatedWidth(item);
777
777
  }
778
+ } else if (node.body) {
779
+ width += estimatedWidth(node.body);
778
780
  } else if (node.type === "supsub") {
779
781
  width += estimatedWidth(node.base);
780
782
  if (node.sub) { width += 0.7 * estimatedWidth(node.sub); }
@@ -13972,7 +13974,7 @@ class Style {
13972
13974
  * https://mit-license.org/
13973
13975
  */
13974
13976
 
13975
- const version = "0.11.05";
13977
+ const version = "0.11.06";
13976
13978
 
13977
13979
  function postProcess(block) {
13978
13980
  const labelMap = {};
package/dist/temml.js CHANGED
@@ -772,10 +772,12 @@ var temml = (function () {
772
772
  // TODO: Remove when Chromium stretches \widetilde & \widehat
773
773
  const estimatedWidth = node => {
774
774
  let width = 0;
775
- if (node.body) {
775
+ if (node.body && Array.isArray(node.body)) {
776
776
  for (const item of node.body) {
777
777
  width += estimatedWidth(item);
778
778
  }
779
+ } else if (node.body) {
780
+ width += estimatedWidth(node.body);
779
781
  } else if (node.type === "supsub") {
780
782
  width += estimatedWidth(node.base);
781
783
  if (node.sub) { width += 0.7 * estimatedWidth(node.sub); }
@@ -12059,7 +12061,7 @@ var temml = (function () {
12059
12061
  * https://mit-license.org/
12060
12062
  */
12061
12063
 
12062
- const version = "0.11.05";
12064
+ const version = "0.11.06";
12063
12065
 
12064
12066
  function postProcess(block) {
12065
12067
  const labelMap = {};