@omer-x/md-to-json 1.0.0 → 1.0.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/dist/index.cjs +19 -5
- package/dist/index.js +16 -2
- package/package.json +10 -8
package/dist/index.cjs
CHANGED
@@ -28,12 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
29
|
|
30
30
|
// src/index.ts
|
31
|
-
var
|
32
|
-
__export(
|
31
|
+
var index_exports = {};
|
32
|
+
__export(index_exports, {
|
33
33
|
convertMarkdownToJSON: () => convertMarkdownToJSON,
|
34
|
-
default: () =>
|
34
|
+
default: () => index_default
|
35
35
|
});
|
36
|
-
module.exports = __toCommonJS(
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
37
37
|
|
38
38
|
// src/core/convertMarkdownToJSON.ts
|
39
39
|
var import_markdown_it = __toESM(require("markdown-it"), 1);
|
@@ -49,6 +49,20 @@ function getTokenCloserType(tokenType) {
|
|
49
49
|
return "paragraph_close";
|
50
50
|
case "heading_open":
|
51
51
|
return "heading_close";
|
52
|
+
case "blockquote_open":
|
53
|
+
return "blockquote_close";
|
54
|
+
case "table_open":
|
55
|
+
return "table_close";
|
56
|
+
case "thead_open":
|
57
|
+
return "thead_close";
|
58
|
+
case "tbody_open":
|
59
|
+
return "tbody_close";
|
60
|
+
case "th_open":
|
61
|
+
return "th_close";
|
62
|
+
case "tr_open":
|
63
|
+
return "tr_close";
|
64
|
+
case "td_open":
|
65
|
+
return "td_close";
|
52
66
|
case "fence":
|
53
67
|
return "fence";
|
54
68
|
default:
|
@@ -152,7 +166,7 @@ function convertMarkdownToJSON(markdown) {
|
|
152
166
|
}
|
153
167
|
|
154
168
|
// src/index.ts
|
155
|
-
var
|
169
|
+
var index_default = convertMarkdownToJSON;
|
156
170
|
// Annotate the CommonJS export names for ESM import in node:
|
157
171
|
0 && (module.exports = {
|
158
172
|
convertMarkdownToJSON
|
package/dist/index.js
CHANGED
@@ -12,6 +12,20 @@ function getTokenCloserType(tokenType) {
|
|
12
12
|
return "paragraph_close";
|
13
13
|
case "heading_open":
|
14
14
|
return "heading_close";
|
15
|
+
case "blockquote_open":
|
16
|
+
return "blockquote_close";
|
17
|
+
case "table_open":
|
18
|
+
return "table_close";
|
19
|
+
case "thead_open":
|
20
|
+
return "thead_close";
|
21
|
+
case "tbody_open":
|
22
|
+
return "tbody_close";
|
23
|
+
case "th_open":
|
24
|
+
return "th_close";
|
25
|
+
case "tr_open":
|
26
|
+
return "tr_close";
|
27
|
+
case "td_open":
|
28
|
+
return "td_close";
|
15
29
|
case "fence":
|
16
30
|
return "fence";
|
17
31
|
default:
|
@@ -115,8 +129,8 @@ function convertMarkdownToJSON(markdown) {
|
|
115
129
|
}
|
116
130
|
|
117
131
|
// src/index.ts
|
118
|
-
var
|
132
|
+
var index_default = convertMarkdownToJSON;
|
119
133
|
export {
|
120
134
|
convertMarkdownToJSON,
|
121
|
-
|
135
|
+
index_default as default
|
122
136
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@omer-x/md-to-json",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.2",
|
4
4
|
"description": "Converts markdown strings into a human-readable JSON format",
|
5
5
|
"keywords": [
|
6
6
|
"markdown",
|
@@ -38,7 +38,8 @@
|
|
38
38
|
}
|
39
39
|
},
|
40
40
|
"scripts": {
|
41
|
-
"test": "
|
41
|
+
"test": "vitest",
|
42
|
+
"test:coverage": "vitest run --coverage",
|
42
43
|
"dev": "tsup --watch",
|
43
44
|
"build": "tsup"
|
44
45
|
},
|
@@ -46,13 +47,14 @@
|
|
46
47
|
"markdown-it": "^14.1.0"
|
47
48
|
},
|
48
49
|
"devDependencies": {
|
49
|
-
"@omer-x/eslint-config": "^2.1.
|
50
|
+
"@omer-x/eslint-config": "^2.1.3",
|
50
51
|
"@omer-x/openapi-types": "^1.2.0",
|
51
52
|
"@types/markdown-it": "^14.1.2",
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"tsup": "^8.
|
56
|
-
"typescript": "^5.
|
53
|
+
"@types/node": "^24.0.7",
|
54
|
+
"@vitest/coverage-v8": "^3.2.4",
|
55
|
+
"eslint": "^9.30.0",
|
56
|
+
"tsup": "^8.5.0",
|
57
|
+
"typescript": "^5.8.3",
|
58
|
+
"vitest": "^3.2.4"
|
57
59
|
}
|
58
60
|
}
|