katex 0.18.4 → 0.18.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/README.md +3 -3
- package/contrib/copy-tex/README.md +2 -2
- package/contrib/mathtex-script-type/README.md +5 -5
- package/contrib/mhchem/README.md +1 -1
- package/dist/README.md +3 -3
- package/dist/katex-swap.css +1 -1
- package/dist/katex-swap.min.css +1 -1
- package/dist/katex.css +1 -1
- package/dist/katex.js +4 -4
- package/dist/katex.min.css +1 -1
- package/dist/katex.min.js +1 -1
- package/dist/katex.mjs +4 -4
- package/package.json +2 -2
- package/src/environments/array.ts +3 -2
- package/src/functions/char.ts +1 -1
package/dist/katex.mjs
CHANGED
|
@@ -7683,7 +7683,7 @@ defineFunction({
|
|
|
7683
7683
|
throw new ParseError("\\@char has non-numeric argument " + number);
|
|
7684
7684
|
// If we drop IE support, the following code could be replaced with
|
|
7685
7685
|
// text = String.fromCodePoint(code)
|
|
7686
|
-
} else if (code < 0 || code
|
|
7686
|
+
} else if (code < 0 || code > 0x10ffff) {
|
|
7687
7687
|
throw new ParseError("\\@char with invalid code point " + number);
|
|
7688
7688
|
} else if (code <= 0xffff) {
|
|
7689
7689
|
text = String.fromCharCode(code);
|
|
@@ -9491,9 +9491,9 @@ 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.
|
|
9494
|
+
// empty row if it's the only one or has a manual tag.
|
|
9495
9495
|
// 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)) {
|
|
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
9497
|
body.pop();
|
|
9498
9498
|
}
|
|
9499
9499
|
if (hLinesBeforeRow.length < body.length + 1) {
|
|
@@ -16275,7 +16275,7 @@ var renderToHTMLTree = function renderToHTMLTree(expression, options) {
|
|
|
16275
16275
|
return renderError(error, expression, settings);
|
|
16276
16276
|
}
|
|
16277
16277
|
};
|
|
16278
|
-
var version = "0.18.
|
|
16278
|
+
var version = "0.18.6";
|
|
16279
16279
|
var __domTree = {
|
|
16280
16280
|
Span,
|
|
16281
16281
|
Anchor,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "katex",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.6",
|
|
4
4
|
"description": "Fast math typesetting for the web.",
|
|
5
5
|
"main": "dist/katex.js",
|
|
6
6
|
"types": "types/katex.d.ts",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"prepare": "husky"
|
|
166
166
|
},
|
|
167
167
|
"dependencies": {
|
|
168
|
-
"commander": "^
|
|
168
|
+
"commander": "^15.0.0"
|
|
169
169
|
},
|
|
170
170
|
"jest": {
|
|
171
171
|
"collectCoverageFrom": [
|
|
@@ -210,12 +210,13 @@ 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.
|
|
213
|
+
// empty row if it's the only one or has a manual tag.
|
|
214
214
|
// NOTE: Currently, `cell` is the last item added into `row`.
|
|
215
215
|
if (row.length === 1 && cell.type === "styling" &&
|
|
216
216
|
cell.body.length === 1 && cell.body[0].type === "ordgroup" &&
|
|
217
217
|
cell.body[0].body.length === 0 &&
|
|
218
|
-
(body.length > 1 || !emptySingleRow)
|
|
218
|
+
(body.length > 1 || !emptySingleRow) &&
|
|
219
|
+
!Array.isArray(tags?.[tags.length - 1])) {
|
|
219
220
|
body.pop();
|
|
220
221
|
}
|
|
221
222
|
if (hLinesBeforeRow.length < body.length + 1) {
|
package/src/functions/char.ts
CHANGED
|
@@ -21,7 +21,7 @@ defineFunction({
|
|
|
21
21
|
throw new ParseError(`\\@char has non-numeric argument ${number}`);
|
|
22
22
|
// If we drop IE support, the following code could be replaced with
|
|
23
23
|
// text = String.fromCodePoint(code)
|
|
24
|
-
} else if (code < 0 || code
|
|
24
|
+
} else if (code < 0 || code > 0x10ffff) {
|
|
25
25
|
throw new ParseError(`\\@char with invalid code point ${number}`);
|
|
26
26
|
} else if (code <= 0xffff) {
|
|
27
27
|
text = String.fromCharCode(code);
|