remark-mdat 0.6.8 → 0.6.10
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/lib/mdat/parse.d.ts
CHANGED
|
@@ -5,7 +5,10 @@ import { type Simplify } from 'type-fest';
|
|
|
5
5
|
* Structured data about a parsed comment.
|
|
6
6
|
* Note that this is a discriminated union based on the `type` field.
|
|
7
7
|
*/
|
|
8
|
-
export type CommentMarker = Simplify<
|
|
8
|
+
export type CommentMarker = Simplify<{
|
|
9
|
+
/** The complete original comment, e.g. `<!-- keyword -->` */
|
|
10
|
+
html: string;
|
|
11
|
+
} & ({
|
|
9
12
|
/** Character used to delimit closing tags, e.g. the `/` in `<!-- /keyword -->` */
|
|
10
13
|
closingPrefix: string;
|
|
11
14
|
/** The first complete word in the comment */
|
|
@@ -27,19 +30,16 @@ export type CommentMarker = Simplify<({
|
|
|
27
30
|
* `native`: A normal comment that does not match the the `keywordPrefix` (if specified)
|
|
28
31
|
*/
|
|
29
32
|
type: 'meta' | 'native';
|
|
30
|
-
})
|
|
31
|
-
/** The complete original comment, e.g. `<!-- keyword -->` */
|
|
32
|
-
html: string;
|
|
33
|
-
}>;
|
|
33
|
+
})>;
|
|
34
34
|
/**
|
|
35
35
|
* Parsed comment with additional information about the Mdast Node and its Parent.
|
|
36
36
|
*/
|
|
37
|
-
export type CommentMarkerNode = Simplify<
|
|
37
|
+
export type CommentMarkerNode = Simplify<{
|
|
38
38
|
/** Original Mdast HTML Node where the comment was found. */
|
|
39
39
|
node: Html;
|
|
40
40
|
/** Parent of original Mdast HTML Node where the comment was found. */
|
|
41
41
|
parent: Parent;
|
|
42
|
-
}>;
|
|
42
|
+
} & CommentMarker>;
|
|
43
43
|
export type CommentMarkerParseOptions = {
|
|
44
44
|
/** Character to identify closing tags, e.g. the `/` in `<!-- /keyword -->` */
|
|
45
45
|
closingPrefix: string;
|
|
@@ -10,17 +10,17 @@ export declare const optionsSchema: z.ZodObject<{
|
|
|
10
10
|
metaCommentIdentifier: z.ZodOptional<z.ZodString>;
|
|
11
11
|
rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<any, z.ZodTypeDef, any>>>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
addMetaComment?: boolean | undefined;
|
|
14
13
|
closingPrefix?: string | undefined;
|
|
15
14
|
keywordPrefix?: string | undefined;
|
|
16
15
|
metaCommentIdentifier?: string | undefined;
|
|
17
16
|
rules?: Record<string, any> | undefined;
|
|
18
|
-
}, {
|
|
19
17
|
addMetaComment?: boolean | undefined;
|
|
18
|
+
}, {
|
|
20
19
|
closingPrefix?: string | undefined;
|
|
21
20
|
keywordPrefix?: string | undefined;
|
|
22
21
|
metaCommentIdentifier?: string | undefined;
|
|
23
22
|
rules?: Record<string, any> | undefined;
|
|
23
|
+
addMetaComment?: boolean | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
/**
|
|
26
26
|
* A remark plugin that expands HTML comments in Markdown files.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remark-mdat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A remark plugin implementing the Markdown Autophagic Template (MDAT) system.",
|
|
6
6
|
"repository": {
|
|
@@ -41,27 +41,27 @@
|
|
|
41
41
|
"remark-plugin"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@types/mdast": "^4.0.
|
|
44
|
+
"@types/mdast": "^4.0.4",
|
|
45
45
|
"@types/unist": "^3.0.2",
|
|
46
46
|
"chalk": "^5.3.0",
|
|
47
|
-
"cli-table3": "^0.6.
|
|
48
|
-
"deepmerge-ts": "^
|
|
47
|
+
"cli-table3": "^0.6.5",
|
|
48
|
+
"deepmerge-ts": "^6.0.0",
|
|
49
49
|
"hast-util-from-html": "^2.0.1",
|
|
50
50
|
"json5": "^2.2.3",
|
|
51
51
|
"remark": "^15.0.1",
|
|
52
52
|
"remark-gfm": "^4.0.0",
|
|
53
|
-
"type-fest": "^4.
|
|
53
|
+
"type-fest": "^4.18.2",
|
|
54
54
|
"unified": "^11.0.4",
|
|
55
55
|
"unist-util-visit": "^5.0.0",
|
|
56
56
|
"vfile": "^6.0.1",
|
|
57
57
|
"vfile-message": "^4.0.2",
|
|
58
|
-
"zod": "^3.
|
|
58
|
+
"zod": "^3.23.8"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@types/node": "^20.
|
|
61
|
+
"@types/node": "^20.12.12",
|
|
62
62
|
"tsup": "^8.0.2",
|
|
63
|
-
"typescript": "^5.4.
|
|
64
|
-
"vitest": "^1.
|
|
63
|
+
"typescript": "^5.4.5",
|
|
64
|
+
"vitest": "^1.6.0"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|