@mdit-vue/shared 2.0.0 → 2.1.0

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/dist/index.cjs CHANGED
@@ -75,10 +75,10 @@ const resolveHeadersFromTokens = (tokens, {
75
75
  };
76
76
  for (let i = 0; i < tokens.length; i += 1) {
77
77
  const token = tokens[i];
78
- if (token?.type !== "heading_open") {
78
+ if (token.type !== "heading_open") {
79
79
  continue;
80
80
  }
81
- if (token?.level !== 0 && !shouldAllowNested) {
81
+ if (token.level !== 0 && !shouldAllowNested) {
82
82
  continue;
83
83
  }
84
84
  const headerLevel = Number.parseInt(token.tag.slice(1), 10);
@@ -86,6 +86,7 @@ const resolveHeadersFromTokens = (tokens, {
86
86
  continue;
87
87
  }
88
88
  const nextToken = tokens[i + 1];
89
+ /* istanbul ignore if -- @preserve */
89
90
  if (!nextToken) {
90
91
  continue;
91
92
  }
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MarkdownItHeader } from '@mdit-vue/types';
2
- import Token from 'markdown-it/lib/token.js';
2
+ import Token from 'markdown-it/lib/token.mjs';
3
3
 
4
4
  /**
5
5
  * Escape html chars
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MarkdownItHeader } from '@mdit-vue/types';
2
- import Token from 'markdown-it/lib/token.js';
2
+ import Token from 'markdown-it/lib/token.mjs';
3
3
 
4
4
  /**
5
5
  * Escape html chars
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MarkdownItHeader } from '@mdit-vue/types';
2
- import Token from 'markdown-it/lib/token.js';
2
+ import Token from 'markdown-it/lib/token.mjs';
3
3
 
4
4
  /**
5
5
  * Escape html chars
package/dist/index.mjs CHANGED
@@ -73,10 +73,10 @@ const resolveHeadersFromTokens = (tokens, {
73
73
  };
74
74
  for (let i = 0; i < tokens.length; i += 1) {
75
75
  const token = tokens[i];
76
- if (token?.type !== "heading_open") {
76
+ if (token.type !== "heading_open") {
77
77
  continue;
78
78
  }
79
- if (token?.level !== 0 && !shouldAllowNested) {
79
+ if (token.level !== 0 && !shouldAllowNested) {
80
80
  continue;
81
81
  }
82
82
  const headerLevel = Number.parseInt(token.tag.slice(1), 10);
@@ -84,6 +84,7 @@ const resolveHeadersFromTokens = (tokens, {
84
84
  continue;
85
85
  }
86
86
  const nextToken = tokens[i + 1];
87
+ /* istanbul ignore if -- @preserve */
87
88
  if (!nextToken) {
88
89
  continue;
89
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdit-vue/shared",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Shared utils and types of mdit-vue",
5
5
  "keywords": [
6
6
  "markdown-it",
@@ -41,12 +41,12 @@
41
41
  "test": "vitest"
42
42
  },
43
43
  "dependencies": {
44
- "@mdit-vue/types": "2.0.0",
45
- "@types/markdown-it": "^13.0.7",
46
- "markdown-it": "^14.0.0"
44
+ "@mdit-vue/types": "2.1.0",
45
+ "@types/markdown-it": "^14.0.0",
46
+ "markdown-it": "^14.1.0"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "25e4e00fdd43d7437b846c6adcc7e0b33c50281d"
51
+ "gitHead": "1d481f8238b3b0d5687e62e009e57ccacfc4a442"
52
52
  }