@vmz/plugin-katex 0.2.3 → 0.2.5

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.
@@ -1,23 +1,22 @@
1
1
  <template>
2
- <div class="katex-host" v-html="format(tex, display)"></div>
2
+ <div v-html="format(tex, display)" class="katex-host" />
3
3
  </template>
4
-
5
4
  <script client>
6
- import katex from 'katex';
5
+ import katex from "katex";
7
6
 
8
7
  function format(tex, display) {
9
- try {
10
- return katex.renderToString(tex ?? '', {
11
- displayMode: !!display,
12
- throwOnError: false,
13
- });
14
- } catch {
15
- return '';
16
- }
8
+ try {
9
+ return katex.renderToString(tex ?? "", {
10
+ displayMode: !!display,
11
+ throwOnError: false,
12
+ });
13
+ } catch {
14
+ return "";
15
+ }
17
16
  }
18
17
 
19
18
  export default class Katex {
20
- public tex: string = '';
21
- public display: boolean = false;
19
+ public tex: string = "";
20
+ public display: boolean = false;
22
21
  }
23
22
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmz/plugin-katex",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "description": "VMZ KaTeX adapter - <Katex> + math engine registration",
6
6
  "license": "MIT",
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "dependencies": {
20
- "@vmz/plugin": "0.2.3"
20
+ "@vmz/plugin": "0.2.5"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "katex": ">=0.16"