marked-katex-extension 5.1.0 → 5.1.2

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
@@ -11,8 +11,8 @@ function index(options = {}) {
11
11
  return {
12
12
  extensions: [
13
13
  inlineKatex(options, createRenderer(options, false)),
14
- blockKatex(options, createRenderer(options, true))
15
- ]
14
+ blockKatex(options, createRenderer(options, true)),
15
+ ],
16
16
  };
17
17
  }
18
18
 
@@ -54,11 +54,11 @@ function inlineKatex(options, renderer) {
54
54
  type: 'inlineKatex',
55
55
  raw: match[0],
56
56
  text: match[2].trim(),
57
- displayMode: match[1].length === 2
57
+ displayMode: match[1].length === 2,
58
58
  };
59
59
  }
60
60
  },
61
- renderer
61
+ renderer,
62
62
  };
63
63
  }
64
64
 
@@ -73,11 +73,11 @@ function blockKatex(options, renderer) {
73
73
  type: 'blockKatex',
74
74
  raw: match[0],
75
75
  text: match[2].trim(),
76
- displayMode: match[1].length === 2
76
+ displayMode: match[1].length === 2,
77
77
  };
78
78
  }
79
79
  },
80
- renderer
80
+ renderer,
81
81
  };
82
82
  }
83
83
 
package/lib/index.umd.js CHANGED
@@ -13,8 +13,8 @@
13
13
  return {
14
14
  extensions: [
15
15
  inlineKatex(options, createRenderer(options, false)),
16
- blockKatex(options, createRenderer(options, true))
17
- ]
16
+ blockKatex(options, createRenderer(options, true)),
17
+ ],
18
18
  };
19
19
  }
20
20
 
@@ -56,11 +56,11 @@
56
56
  type: 'inlineKatex',
57
57
  raw: match[0],
58
58
  text: match[2].trim(),
59
- displayMode: match[1].length === 2
59
+ displayMode: match[1].length === 2,
60
60
  };
61
61
  }
62
62
  },
63
- renderer
63
+ renderer,
64
64
  };
65
65
  }
66
66
 
@@ -75,11 +75,11 @@
75
75
  type: 'blockKatex',
76
76
  raw: match[0],
77
77
  text: match[2].trim(),
78
- displayMode: match[1].length === 2
78
+ displayMode: match[1].length === 2,
79
79
  };
80
80
  }
81
81
  },
82
- renderer
82
+ renderer,
83
83
  };
84
84
  }
85
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marked-katex-extension",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "MarkedJS extesion to render katex",
5
5
  "main": "./lib/index.cjs",
6
6
  "module": "./src/index.js",
@@ -28,7 +28,7 @@
28
28
  "test:spec": "node --test spec/marked-tests.js",
29
29
  "test:cover": "jest --coverage",
30
30
  "test:types": "tsd -f spec/index.test-d.ts -t src/index.d.ts",
31
- "lint": "eslint .",
31
+ "lint": "eslint",
32
32
  "build": "rollup -c rollup.config.js",
33
33
  "update-specs": "node ./update-specs.js"
34
34
  },
@@ -43,33 +43,30 @@
43
43
  },
44
44
  "homepage": "https://github.com/UziTech/marked-katex-extension#readme",
45
45
  "peerDependencies": {
46
- "marked": ">=4 <14",
47
- "katex": ">=0.16 <0.17"
46
+ "katex": ">=0.16 <0.17",
47
+ "marked": ">=4 <15"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/core": "^7.24.9",
51
- "@babel/preset-env": "^7.25.0",
50
+ "@babel/core": "^7.25.2",
51
+ "@babel/preset-env": "^7.25.4",
52
+ "@markedjs/eslint-config": "^1.0.1",
52
53
  "@markedjs/testutils": "13.0.0-0",
53
54
  "@rollup/plugin-node-resolve": "^15.2.3",
54
55
  "@semantic-release/changelog": "^6.0.3",
55
56
  "@semantic-release/commit-analyzer": "^13.0.0",
56
57
  "@semantic-release/git": "^10.0.1",
57
- "@semantic-release/github": "^10.1.3",
58
+ "@semantic-release/github": "^10.1.7",
58
59
  "@semantic-release/npm": "^12.0.1",
59
60
  "@semantic-release/release-notes-generator": "^14.0.1",
60
61
  "babel-jest": "^29.7.0",
61
- "cheerio": "^1.0.0-rc.12",
62
- "eslint": "^8.57.0",
63
- "eslint-config-standard": "^17.1.0",
64
- "eslint-plugin-import": "^2.29.1",
65
- "eslint-plugin-n": "^16.6.2",
66
- "eslint-plugin-promise": "^6.6.0",
62
+ "cheerio": "^1.0.0",
63
+ "globals": "^15.9.0",
67
64
  "jest-cli": "^29.7.0",
68
65
  "katex": "^0.16.11",
69
- "marked": "^13.0.3",
66
+ "marked": "^14.1.0",
70
67
  "node-fetch": "^3.3.2",
71
- "rollup": "^4.19.1",
72
- "semantic-release": "^24.0.0",
68
+ "rollup": "^4.21.1",
69
+ "semantic-release": "^24.1.0",
73
70
  "tsd": "^0.31.1"
74
71
  },
75
72
  "dependencies": {
package/src/index.d.ts CHANGED
@@ -1 +1,8 @@
1
- export default function markedKatex(options?: import('katex').KatexOptions): import('marked').MarkedExtension
1
+ import type { KatexOptions } from 'katex';
2
+ import type { MarkedExtension } from 'marked';
3
+
4
+ export interface MarkedKatexOptions extends KatexOptions {
5
+ nonStandard?: boolean
6
+ }
7
+
8
+ export default function markedKatex(options?: MarkedKatexOptions): MarkedExtension;
package/src/index.js CHANGED
@@ -9,8 +9,8 @@ export default function(options = {}) {
9
9
  return {
10
10
  extensions: [
11
11
  inlineKatex(options, createRenderer(options, false)),
12
- blockKatex(options, createRenderer(options, true))
13
- ]
12
+ blockKatex(options, createRenderer(options, true)),
13
+ ],
14
14
  };
15
15
  }
16
16
 
@@ -52,11 +52,11 @@ function inlineKatex(options, renderer) {
52
52
  type: 'inlineKatex',
53
53
  raw: match[0],
54
54
  text: match[2].trim(),
55
- displayMode: match[1].length === 2
55
+ displayMode: match[1].length === 2,
56
56
  };
57
57
  }
58
58
  },
59
- renderer
59
+ renderer,
60
60
  };
61
61
  }
62
62
 
@@ -71,10 +71,10 @@ function blockKatex(options, renderer) {
71
71
  type: 'blockKatex',
72
72
  raw: match[0],
73
73
  text: match[2].trim(),
74
- displayMode: match[1].length === 2
74
+ displayMode: match[1].length === 2,
75
75
  };
76
76
  }
77
77
  },
78
- renderer
78
+ renderer,
79
79
  };
80
80
  }