katex 0.18.7 → 0.18.8

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/katex.mjs CHANGED
@@ -9491,9 +9491,10 @@ function parseArray(parser, _ref, style) {
9491
9491
  endRow();
9492
9492
  // Arrays terminate newlines with `\crcr` which consumes a `\cr` if
9493
9493
  // the last line is empty. However, AMS environments keep the
9494
- // empty row if it's the only one or has a manual tag.
9494
+ // empty row if it's the only one, has a manual tag, or is an
9495
+ // automatically numbered row explicitly ended with `\\`.
9495
9496
  // NOTE: Currently, `cell` is the last item added into `row`.
9496
- if (row.length === 1 && cell.type === "styling" && cell.body.length === 1 && cell.body[0].type === "ordgroup" && cell.body[0].body.length === 0 && (body.length > 1 || !emptySingleRow) && !Array.isArray(tags == null ? void 0 : tags[tags.length - 1])) {
9497
+ if (row.length === 1 && cell.type === "styling" && cell.body.length === 1 && cell.body[0].type === "ordgroup" && cell.body[0].body.length === 0 && (body.length > 1 || !emptySingleRow) && !Array.isArray(tags == null ? void 0 : tags[tags.length - 1]) && !(autoTag && (tags == null ? void 0 : tags[tags.length - 1]) === true)) {
9497
9498
  body.pop();
9498
9499
  }
9499
9500
  if (hLinesBeforeRow.length < body.length + 1) {
@@ -16309,7 +16310,7 @@ var renderToHTMLTree = function renderToHTMLTree(expression, options) {
16309
16310
  return renderError(error, expression, settings);
16310
16311
  }
16311
16312
  };
16312
- var version = "0.18.7";
16313
+ var version = "0.18.8";
16313
16314
  var __domTree = {
16314
16315
  Span,
16315
16316
  Anchor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "katex",
3
- "version": "0.18.7",
3
+ "version": "0.18.8",
4
4
  "description": "Fast math typesetting for the web.",
5
5
  "main": "dist/katex.js",
6
6
  "types": "types/katex.d.ts",
@@ -210,13 +210,15 @@ function parseArray(
210
210
  endRow();
211
211
  // Arrays terminate newlines with `\crcr` which consumes a `\cr` if
212
212
  // the last line is empty. However, AMS environments keep the
213
- // empty row if it's the only one or has a manual tag.
213
+ // empty row if it's the only one, has a manual tag, or is an
214
+ // automatically numbered row explicitly ended with `\\`.
214
215
  // NOTE: Currently, `cell` is the last item added into `row`.
215
216
  if (row.length === 1 && cell.type === "styling" &&
216
217
  cell.body.length === 1 && cell.body[0].type === "ordgroup" &&
217
218
  cell.body[0].body.length === 0 &&
218
219
  (body.length > 1 || !emptySingleRow) &&
219
- !Array.isArray(tags?.[tags.length - 1])) {
220
+ !Array.isArray(tags?.[tags.length - 1]) &&
221
+ !(autoTag && tags?.[tags.length - 1] === true)) {
220
222
  body.pop();
221
223
  }
222
224
  if (hLinesBeforeRow.length < body.length + 1) {