pantsdown 2.2.3 → 2.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.
- package/.oxfmtrc.json +17 -0
- package/CLAUDE.md +1 -0
- package/README.md +44 -26
- package/bun.lock +1504 -0
- package/eslint.config.ts +46 -0
- package/package.json +47 -43
- package/src/css/styles.css +581 -581
- package/src/lexer.ts +419 -419
- package/src/pantsdown.ts +39 -38
- package/src/parser.ts +223 -239
- package/src/renderer.ts +237 -245
- package/src/rules/block.ts +99 -101
- package/src/rules/inline.ts +92 -92
- package/src/rules/utils.ts +14 -14
- package/src/tokenizer.ts +911 -919
- package/src/types.ts +262 -244
- package/src/utils.ts +278 -241
- package/tsconfig.json +2 -1
- package/.prettierignore +0 -1
- package/src/css/styles.css.d.ts +0 -4
package/eslint.config.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* eslint import-x/no-named-as-default-member: 0 */
|
|
2
|
+
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
3
|
+
import { importX } from "eslint-plugin-import-x";
|
|
4
|
+
import { defineConfig } from "eslint/config";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
6
|
+
|
|
7
|
+
export default defineConfig([
|
|
8
|
+
tseslint.configs.strictTypeChecked,
|
|
9
|
+
tseslint.configs.stylisticTypeChecked,
|
|
10
|
+
importX.flatConfigs.recommended,
|
|
11
|
+
importX.flatConfigs.typescript,
|
|
12
|
+
{
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parserOptions: {
|
|
15
|
+
projectService: true,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
settings: {
|
|
19
|
+
"import-x/resolver-next": [
|
|
20
|
+
createTypeScriptImportResolver({
|
|
21
|
+
// Resolve Bun modules
|
|
22
|
+
bun: true,
|
|
23
|
+
project: ["./tsconfig.json"],
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
rules: {
|
|
28
|
+
"import-x/no-deprecated": 1,
|
|
29
|
+
"import-x/no-empty-named-blocks": 1,
|
|
30
|
+
"import-x/no-extraneous-dependencies": 1,
|
|
31
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
32
|
+
"@typescript-eslint/only-throw-error": 0,
|
|
33
|
+
"@typescript-eslint/no-non-null-assertion": 0,
|
|
34
|
+
"@typescript-eslint/no-misused-promises": 0,
|
|
35
|
+
"@typescript-eslint/restrict-template-expressions": 0,
|
|
36
|
+
"@typescript-eslint/no-unused-vars": [
|
|
37
|
+
"error",
|
|
38
|
+
{
|
|
39
|
+
varsIgnorePattern: "^_",
|
|
40
|
+
argsIgnorePattern: "^_",
|
|
41
|
+
caughtErrorsIgnorePattern: "^_",
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,73 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantsdown",
|
|
3
|
-
"
|
|
4
|
-
"type": "module",
|
|
5
|
-
"version": "2.2.3",
|
|
6
|
-
"license": "MIT",
|
|
3
|
+
"version": "2.2.5",
|
|
7
4
|
"description": "Markdown to 'GitHub HTML' parser",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "wallpants",
|
|
8
7
|
"repository": {
|
|
9
8
|
"type": "git",
|
|
10
9
|
"url": "git://github.com/wallpants/pantsdown.git"
|
|
11
10
|
},
|
|
11
|
+
"type": "module",
|
|
12
12
|
"exports": {
|
|
13
|
+
"./*": "./*",
|
|
13
14
|
"./styles.css": {
|
|
14
|
-
"types": "./src/css/styles.css.d.ts",
|
|
15
15
|
"bun": "./src/css/styles.css",
|
|
16
16
|
"import": "./src/css/styles.css"
|
|
17
17
|
},
|
|
18
18
|
".": {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
"release": {
|
|
25
|
-
"branches": [
|
|
26
|
-
"main"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"config": {
|
|
30
|
-
"commitizen": {
|
|
31
|
-
"path": "@commitlint/cz-commitlint"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"commitlint": {
|
|
35
|
-
"extends": [
|
|
36
|
-
"@commitlint/config-conventional"
|
|
37
|
-
],
|
|
38
|
-
"rules": {
|
|
39
|
-
"body-max-line-length": [
|
|
40
|
-
0
|
|
41
|
-
]
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./src/index.ts",
|
|
21
|
+
"default": "./src/index.ts"
|
|
22
|
+
}
|
|
42
23
|
}
|
|
43
24
|
},
|
|
44
25
|
"scripts": {
|
|
45
26
|
"commit": "cz",
|
|
46
|
-
"format": "
|
|
27
|
+
"format": "oxfmt .",
|
|
47
28
|
"typecheck": "tsc",
|
|
48
|
-
"lint": "eslint .
|
|
29
|
+
"lint": "eslint .",
|
|
49
30
|
"check": "bun run typecheck && bun run lint",
|
|
50
31
|
"docs:build": "bun run docs/build.ts"
|
|
51
32
|
},
|
|
52
33
|
"dependencies": {
|
|
53
34
|
"github-slugger": "^2.0.0",
|
|
54
35
|
"highlight.js": "^11.11.1",
|
|
55
|
-
"katex": "^0.
|
|
36
|
+
"katex": "^0.17.0"
|
|
56
37
|
},
|
|
57
38
|
"devDependencies": {
|
|
58
|
-
"@commitlint/config-conventional": "^
|
|
59
|
-
"@commitlint/cz-commitlint": "^
|
|
60
|
-
"@happy-dom/global-registrator": "^
|
|
61
|
-
"@types/bun": "^1.3.
|
|
39
|
+
"@commitlint/config-conventional": "^21.0.2",
|
|
40
|
+
"@commitlint/cz-commitlint": "^21.0.2",
|
|
41
|
+
"@happy-dom/global-registrator": "^20.9.0",
|
|
42
|
+
"@types/bun": "^1.3.14",
|
|
62
43
|
"@types/katex": "^0.16.8",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
64
|
-
"@typescript-eslint/parser": "^8.
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^8.60.0",
|
|
45
|
+
"@typescript-eslint/parser": "^8.60.0",
|
|
65
46
|
"commitizen": "^4.3.1",
|
|
66
|
-
"commitlint": "^
|
|
67
|
-
"eslint": "^
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
47
|
+
"commitlint": "^21.0.2",
|
|
48
|
+
"eslint": "^9.39.4",
|
|
49
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
50
|
+
"eslint-plugin-import-x": "^4.16.2",
|
|
51
|
+
"inquirer": "^12.11.1",
|
|
52
|
+
"oxfmt": "^0.52.0",
|
|
53
|
+
"semantic-release": "^25.0.3",
|
|
54
|
+
"typescript": "6.0.3",
|
|
55
|
+
"typescript-eslint": "^8.60.0"
|
|
56
|
+
},
|
|
57
|
+
"commitlint": {
|
|
58
|
+
"extends": [
|
|
59
|
+
"@commitlint/config-conventional"
|
|
60
|
+
],
|
|
61
|
+
"rules": {
|
|
62
|
+
"body-max-line-length": [
|
|
63
|
+
0
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"config": {
|
|
68
|
+
"commitizen": {
|
|
69
|
+
"path": "@commitlint/cz-commitlint"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"release": {
|
|
73
|
+
"branches": [
|
|
74
|
+
"main"
|
|
75
|
+
]
|
|
72
76
|
}
|
|
73
77
|
}
|