katex 0.16.26 → 0.16.28
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 +9 -6
- package/dist/katex.min.css +1 -1
- package/dist/katex.min.js +1 -1
- package/dist/katex.mjs +11 -6
- package/package.json +2 -1
- package/src/Parser.js +1 -1
- package/src/functions/html.js +8 -5
package/dist/katex.mjs
CHANGED
|
@@ -12544,13 +12544,18 @@ defineFunction({
|
|
|
12544
12544
|
var data = value.split(",");
|
|
12545
12545
|
|
|
12546
12546
|
for (var i = 0; i < data.length; i++) {
|
|
12547
|
-
var
|
|
12547
|
+
var item = data[i];
|
|
12548
|
+
var firstEquals = item.indexOf("=");
|
|
12548
12549
|
|
|
12549
|
-
if (
|
|
12550
|
-
throw new ParseError("
|
|
12550
|
+
if (firstEquals < 0) {
|
|
12551
|
+
throw new ParseError("\\htmlData key/value '" + item + "'" + " missing equals sign");
|
|
12551
12552
|
}
|
|
12552
12553
|
|
|
12553
|
-
|
|
12554
|
+
var key = item.slice(0, firstEquals);
|
|
12555
|
+
|
|
12556
|
+
var _value = item.slice(firstEquals + 1);
|
|
12557
|
+
|
|
12558
|
+
attributes["data-" + key.trim()] = _value;
|
|
12554
12559
|
}
|
|
12555
12560
|
|
|
12556
12561
|
trustContext = {
|
|
@@ -17345,7 +17350,7 @@ class Parser {
|
|
|
17345
17350
|
* Parses an "expression", which is a list of atoms.
|
|
17346
17351
|
*
|
|
17347
17352
|
* `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
|
|
17348
|
-
* happens when functions have higher precedence
|
|
17353
|
+
* happens when functions have higher precedence than infix
|
|
17349
17354
|
* nodes in implicit parses.
|
|
17350
17355
|
*
|
|
17351
17356
|
* `breakOnTokenText`: The text of the token that the expression should end
|
|
@@ -18438,7 +18443,7 @@ var renderToHTMLTree = function renderToHTMLTree(expression, options) {
|
|
|
18438
18443
|
}
|
|
18439
18444
|
};
|
|
18440
18445
|
|
|
18441
|
-
var version = "0.16.
|
|
18446
|
+
var version = "0.16.28";
|
|
18442
18447
|
var __domTree = {
|
|
18443
18448
|
Span,
|
|
18444
18449
|
Anchor,
|
package/package.json
CHANGED
package/src/Parser.js
CHANGED
|
@@ -178,7 +178,7 @@ export default class Parser {
|
|
|
178
178
|
* Parses an "expression", which is a list of atoms.
|
|
179
179
|
*
|
|
180
180
|
* `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
|
|
181
|
-
* happens when functions have higher precedence
|
|
181
|
+
* happens when functions have higher precedence than infix
|
|
182
182
|
* nodes in implicit parses.
|
|
183
183
|
*
|
|
184
184
|
* `breakOnTokenText`: The text of the token that the expression should end
|
package/src/functions/html.js
CHANGED
|
@@ -52,12 +52,15 @@ defineFunction({
|
|
|
52
52
|
case "\\htmlData": {
|
|
53
53
|
const data = value.split(",");
|
|
54
54
|
for (let i = 0; i < data.length; i++) {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const item = data[i];
|
|
56
|
+
const firstEquals = item.indexOf("=");
|
|
57
|
+
if (firstEquals < 0) {
|
|
58
|
+
throw new ParseError(`\\htmlData key/value '${item}'` +
|
|
59
|
+
` missing equals sign`);
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
+
const key = item.slice(0, firstEquals);
|
|
62
|
+
const value = item.slice(firstEquals + 1);
|
|
63
|
+
attributes["data-" + key.trim()] = value;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
trustContext = {
|