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 +4 -2
- package/dist/temml.js +4 -2
- package/dist/temml.min.js +1 -1
- package/dist/temml.mjs +4 -2
- package/dist/temmlPostProcess.js +1 -1
- package/package.json +1 -1
- package/src/postProcess.js +1 -1
- package/src/stretchy.js +3 -1
package/dist/temml.mjs
CHANGED
@@ -769,10 +769,12 @@ var mathMLTree = {
|
|
769
769
|
// TODO: Remove when Chromium stretches \widetilde & \widehat
|
770
770
|
const estimatedWidth = node => {
|
771
771
|
let width = 0;
|
772
|
-
if (node.body) {
|
772
|
+
if (node.body && Array.isArray(node.body)) {
|
773
773
|
for (const item of node.body) {
|
774
774
|
width += estimatedWidth(item);
|
775
775
|
}
|
776
|
+
} else if (node.body) {
|
777
|
+
width += estimatedWidth(node.body);
|
776
778
|
} else if (node.type === "supsub") {
|
777
779
|
width += estimatedWidth(node.base);
|
778
780
|
if (node.sub) { width += 0.7 * estimatedWidth(node.sub); }
|
@@ -13970,7 +13972,7 @@ class Style {
|
|
13970
13972
|
* https://mit-license.org/
|
13971
13973
|
*/
|
13972
13974
|
|
13973
|
-
const version = "0.11.
|
13975
|
+
const version = "0.11.06";
|
13974
13976
|
|
13975
13977
|
function postProcess(block) {
|
13976
13978
|
const labelMap = {};
|
package/dist/temmlPostProcess.js
CHANGED
package/package.json
CHANGED
package/src/postProcess.js
CHANGED
package/src/stretchy.js
CHANGED
@@ -7,10 +7,12 @@ import mathMLTree from "./mathMLTree"
|
|
7
7
|
// TODO: Remove when Chromium stretches \widetilde & \widehat
|
8
8
|
const estimatedWidth = node => {
|
9
9
|
let width = 0
|
10
|
-
if (node.body) {
|
10
|
+
if (node.body && Array.isArray(node.body)) {
|
11
11
|
for (const item of node.body) {
|
12
12
|
width += estimatedWidth(item)
|
13
13
|
}
|
14
|
+
} else if (node.body) {
|
15
|
+
width += estimatedWidth(node.body)
|
14
16
|
} else if (node.type === "supsub") {
|
15
17
|
width += estimatedWidth(node.base)
|
16
18
|
if (node.sub) { width += 0.7 * estimatedWidth(node.sub) }
|