temml 0.11.8 → 0.11.9

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.mjs CHANGED
@@ -7963,13 +7963,25 @@ defineFunction({
7963
7963
  handler: (context, args) => {
7964
7964
  const delim = checkDelimiter(args[0], context);
7965
7965
 
7966
- return {
7966
+ const delimNode = {
7967
7967
  type: "delimsizing",
7968
7968
  mode: context.parser.mode,
7969
7969
  size: delimiterSizes[context.funcName].size,
7970
7970
  mclass: delimiterSizes[context.funcName].mclass,
7971
7971
  delim: delim.text
7972
7972
  };
7973
+ const nextToken = context.parser.fetch().text;
7974
+ if (nextToken !== "^" && nextToken !== "_") {
7975
+ return delimNode
7976
+ } else {
7977
+ // Chromium mis-renders a sized delim if it is the base of a supsub.
7978
+ // So wrap it in a ordgroup.
7979
+ return {
7980
+ type: "ordgroup",
7981
+ mode: "math",
7982
+ body: [delimNode, { type: "ordgroup", mode: "math", body: [] }]
7983
+ }
7984
+ }
7973
7985
  },
7974
7986
  mathmlBuilder: (group) => {
7975
7987
  const children = [];
@@ -14008,7 +14020,7 @@ class Style {
14008
14020
  * https://mit-license.org/
14009
14021
  */
14010
14022
 
14011
- const version = "0.11.08";
14023
+ const version = "0.11.09";
14012
14024
 
14013
14025
  function postProcess(block) {
14014
14026
  const labelMap = {};
@@ -11,7 +11,7 @@
11
11
  * https://mit-license.org/
12
12
  */
13
13
 
14
- const version = "0.11.08";
14
+ const version = "0.11.09";
15
15
 
16
16
  function postProcess(block) {
17
17
  const labelMap = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "temml",
3
- "version": "0.11.08",
3
+ "version": "0.11.09",
4
4
  "description": "TeX to MathML conversion in JavaScript.",
5
5
  "main": "dist/temml.js",
6
6
  "engines": {
@@ -159,13 +159,25 @@ defineFunction({
159
159
  handler: (context, args) => {
160
160
  const delim = checkDelimiter(args[0], context);
161
161
 
162
- return {
162
+ const delimNode = {
163
163
  type: "delimsizing",
164
164
  mode: context.parser.mode,
165
165
  size: delimiterSizes[context.funcName].size,
166
166
  mclass: delimiterSizes[context.funcName].mclass,
167
167
  delim: delim.text
168
- };
168
+ }
169
+ const nextToken = context.parser.fetch().text
170
+ if (nextToken !== "^" && nextToken !== "_") {
171
+ return delimNode
172
+ } else {
173
+ // Chromium mis-renders a sized delim if it is the base of a supsub.
174
+ // So wrap it in a ordgroup.
175
+ return {
176
+ type: "ordgroup",
177
+ mode: "math",
178
+ body: [delimNode, { type: "ordgroup", mode: "math", body: [] }]
179
+ }
180
+ }
169
181
  },
170
182
  mathmlBuilder: (group) => {
171
183
  const children = [];
@@ -5,7 +5,7 @@
5
5
  * https://mit-license.org/
6
6
  */
7
7
 
8
- export const version = "0.11.08";
8
+ export const version = "0.11.09";
9
9
 
10
10
  export function postProcess(block) {
11
11
  const labelMap = {}