marked-katex-extension 3.0.6 → 4.0.1

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/lib/index.cjs CHANGED
@@ -55,7 +55,6 @@ function blockKatex(options, renderer) {
55
55
  return {
56
56
  name: 'blockKatex',
57
57
  level: 'block',
58
- start(src) { return src.indexOf('\n$'); },
59
58
  tokenizer(src, tokens) {
60
59
  const match = src.match(blockRule);
61
60
  if (match) {
package/lib/index.umd.js CHANGED
@@ -5176,6 +5176,10 @@
5176
5176
  defineSymbol(text, main, textord, _ch3, wideChar);
5177
5177
  wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fractur
5178
5178
 
5179
+ defineSymbol(math, main, mathord, _ch3, wideChar);
5180
+ defineSymbol(text, main, textord, _ch3, wideChar);
5181
+ wideChar = String.fromCharCode(0xD835, 0xDD6C + _i3); // A-Z a-z bold Fractur
5182
+
5179
5183
  defineSymbol(math, main, mathord, _ch3, wideChar);
5180
5184
  defineSymbol(text, main, textord, _ch3, wideChar);
5181
5185
  wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif
@@ -5283,8 +5287,9 @@
5283
5287
  ["mathfrak", "textfrak", "Fraktur-Regular"], // a-z Fraktur
5284
5288
  ["mathbb", "textbb", "AMS-Regular"], // A-Z double-struck
5285
5289
  ["mathbb", "textbb", "AMS-Regular"], // k double-struck
5286
- ["", "", ""], // A-Z bold Fraktur No font metrics
5287
- ["", "", ""], // a-z bold Fraktur. No font.
5290
+ // Note that we are using a bold font, but font metrics for regular Fraktur.
5291
+ ["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // A-Z bold Fraktur
5292
+ ["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // a-z bold Fraktur
5288
5293
  ["mathsf", "textsf", "SansSerif-Regular"], // A-Z sans-serif
5289
5294
  ["mathsf", "textsf", "SansSerif-Regular"], // a-z sans-serif
5290
5295
  ["mathboldsf", "textboldsf", "SansSerif-Bold"], // A-Z bold sans-serif
@@ -5460,10 +5465,15 @@
5460
5465
 
5461
5466
  var isFont = mode === "math" || mode === "text" && options.font;
5462
5467
  var fontOrFamily = isFont ? options.font : options.fontFamily;
5468
+ var wideFontName = "";
5469
+ var wideFontClass = "";
5463
5470
 
5464
5471
  if (text.charCodeAt(0) === 0xD835) {
5472
+ [wideFontName, wideFontClass] = wideCharacterFont(text, mode);
5473
+ }
5474
+
5475
+ if (wideFontName.length > 0) {
5465
5476
  // surrogate pairs get special treatment
5466
- var [wideFontName, wideFontClass] = wideCharacterFont(text, mode);
5467
5477
  return makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass));
5468
5478
  } else if (fontOrFamily) {
5469
5479
  var fontName;
@@ -18315,7 +18325,7 @@
18315
18325
  /**
18316
18326
  * Current KaTeX version
18317
18327
  */
18318
- version: "0.16.8",
18328
+ version: "0.16.9",
18319
18329
 
18320
18330
  /**
18321
18331
  * Renders the given LaTeX into an HTML+MathML combination, and adds
@@ -18462,7 +18472,6 @@
18462
18472
  return {
18463
18473
  name: 'blockKatex',
18464
18474
  level: 'block',
18465
- start(src) { return src.indexOf('\n$'); },
18466
18475
  tokenizer(src, tokens) {
18467
18476
  const match = src.match(blockRule);
18468
18477
  if (match) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marked-katex-extension",
3
- "version": "3.0.6",
3
+ "version": "4.0.1",
4
4
  "description": "MarkedJS extesion to render katex",
5
5
  "main": "./lib/index.cjs",
6
6
  "module": "./src/index.js",
@@ -44,31 +44,31 @@
44
44
  "marked": ">=4 <10"
45
45
  },
46
46
  "devDependencies": {
47
- "@babel/core": "^7.22.17",
48
- "@babel/preset-env": "^7.22.15",
47
+ "@babel/core": "^7.23.0",
48
+ "@babel/preset-env": "^7.22.20",
49
49
  "@rollup/plugin-node-resolve": "^15.2.1",
50
50
  "@semantic-release/changelog": "^6.0.3",
51
- "@semantic-release/commit-analyzer": "^10.0.4",
51
+ "@semantic-release/commit-analyzer": "^11.0.0",
52
52
  "@semantic-release/git": "^10.0.1",
53
- "@semantic-release/github": "^9.0.5",
54
- "@semantic-release/npm": "^10.0.5",
55
- "@semantic-release/release-notes-generator": "^11.0.7",
56
- "babel-jest": "^29.6.4",
53
+ "@semantic-release/github": "^9.2.1",
54
+ "@semantic-release/npm": "^11.0.0",
55
+ "@semantic-release/release-notes-generator": "^12.0.0",
56
+ "babel-jest": "^29.7.0",
57
57
  "cheerio": "^1.0.0-rc.12",
58
- "eslint": "^8.49.0",
58
+ "eslint": "^8.50.0",
59
59
  "eslint-config-standard": "^17.1.0",
60
60
  "eslint-plugin-import": "^2.28.1",
61
61
  "eslint-plugin-n": "^16.1.0",
62
62
  "eslint-plugin-promise": "^6.1.1",
63
- "jest-cli": "^29.6.4",
64
- "marked": "^9.0.0",
63
+ "jest-cli": "^29.7.0",
64
+ "marked": "^9.0.3",
65
65
  "node-fetch": "^3.3.2",
66
- "rollup": "^3.29.1",
67
- "semantic-release": "^21.1.1",
66
+ "rollup": "^3.29.4",
67
+ "semantic-release": "^22.0.5",
68
68
  "tsd": "^0.29.0"
69
69
  },
70
70
  "dependencies": {
71
- "@types/katex": "^0.16.2",
72
- "katex": "^0.16.8"
71
+ "@types/katex": "^0.16.3",
72
+ "katex": "^0.16.9"
73
73
  }
74
74
  }
package/src/index.js CHANGED
@@ -53,7 +53,6 @@ function blockKatex(options, renderer) {
53
53
  return {
54
54
  name: 'blockKatex',
55
55
  level: 'block',
56
- start(src) { return src.indexOf('\n$'); },
57
56
  tokenizer(src, tokens) {
58
57
  const match = src.match(blockRule);
59
58
  if (match) {