mdquiz 0.0.0 → 0.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/dist/index.mjs +1 -1
- package/package.json +26 -29
package/dist/index.mjs
CHANGED
|
@@ -23,7 +23,7 @@ function parseQuestionFile(content, id) {
|
|
|
23
23
|
const { data, content: body } = matter(content);
|
|
24
24
|
const questionText = data.question;
|
|
25
25
|
if (!questionText) throw new Error(`Missing 'question' in frontmatter for ${id}`);
|
|
26
|
-
const lines = body.split("\n");
|
|
26
|
+
const lines = body.replace(/\r\n/g, "\n").split("\n");
|
|
27
27
|
const answerStarts = [];
|
|
28
28
|
let inFence = false;
|
|
29
29
|
for (let i = 0; i < lines.length; i++) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdquiz",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"packageManager": "pnpm@10.33.0",
|
|
4
|
+
"version": "0.0.1",
|
|
6
5
|
"description": "Parse markdown quiz files into structured objects. Supports YAML frontmatter, checkbox answers, code blocks, and hint blockquotes.",
|
|
7
6
|
"author": "Aleksander Fidelus",
|
|
8
7
|
"license": "MIT",
|
|
@@ -31,40 +30,38 @@
|
|
|
31
30
|
"files": [
|
|
32
31
|
"dist"
|
|
33
32
|
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "tsdown",
|
|
36
|
-
"dev": "tsdown --watch",
|
|
37
|
-
"lint": "eslint",
|
|
38
|
-
"prepublishOnly": "nr build",
|
|
39
|
-
"release": "bumpp",
|
|
40
|
-
"start": "tsx src/index.ts",
|
|
41
|
-
"test": "vitest",
|
|
42
|
-
"typecheck": "tsc",
|
|
43
|
-
"prepare": "simple-git-hooks"
|
|
44
|
-
},
|
|
45
33
|
"dependencies": {
|
|
46
|
-
"gray-matter": "
|
|
34
|
+
"gray-matter": "^4.0.3"
|
|
47
35
|
},
|
|
48
36
|
"devDependencies": {
|
|
49
|
-
"@antfu/eslint-config": "
|
|
50
|
-
"@antfu/ni": "
|
|
51
|
-
"@types/node": "
|
|
52
|
-
"bumpp": "
|
|
53
|
-
"eslint": "
|
|
54
|
-
"lint-staged": "
|
|
55
|
-
"publint": "
|
|
56
|
-
"simple-git-hooks": "
|
|
57
|
-
"tsdown": "
|
|
58
|
-
"tsnapi": "
|
|
59
|
-
"tsx": "
|
|
60
|
-
"typescript": "
|
|
61
|
-
"vite": "
|
|
62
|
-
"vitest": "
|
|
37
|
+
"@antfu/eslint-config": "^8.1.1",
|
|
38
|
+
"@antfu/ni": "^30.0.0",
|
|
39
|
+
"@types/node": "^25.6.0",
|
|
40
|
+
"bumpp": "^11.0.1",
|
|
41
|
+
"eslint": "^10.2.0",
|
|
42
|
+
"lint-staged": "^16.4.0",
|
|
43
|
+
"publint": "^0.3.18",
|
|
44
|
+
"simple-git-hooks": "^2.13.1",
|
|
45
|
+
"tsdown": "^0.17.3",
|
|
46
|
+
"tsnapi": "^0.1.1",
|
|
47
|
+
"tsx": "^4.21.0",
|
|
48
|
+
"typescript": "^6.0.2",
|
|
49
|
+
"vite": "^8.0.8",
|
|
50
|
+
"vitest": "^4.1.4"
|
|
63
51
|
},
|
|
64
52
|
"simple-git-hooks": {
|
|
65
53
|
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && pnpm run build && npx lint-staged"
|
|
66
54
|
},
|
|
67
55
|
"lint-staged": {
|
|
68
56
|
"*": "eslint --fix"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsdown",
|
|
60
|
+
"dev": "tsdown --watch",
|
|
61
|
+
"lint": "eslint",
|
|
62
|
+
"release": "bumpp",
|
|
63
|
+
"start": "tsx src/index.ts",
|
|
64
|
+
"test": "vitest",
|
|
65
|
+
"typecheck": "tsc"
|
|
69
66
|
}
|
|
70
|
-
}
|
|
67
|
+
}
|