@markuplint/parser-utils 5.5.0 → 5.6.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/CHANGELOG.md +11 -0
- package/lib/idl-attributes.js +1 -1
- package/lib/parser.d.ts +4 -0
- package/lib/parser.js +8 -0
- package/lib/types.d.ts +1 -0
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.6.0](https://github.com/markuplint/markuplint/compare/v5.5.0...v5.6.0) (2026-11-12)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **parser-utils:** map the IDL attribute acceptCharset to accept-charset ([6f78de8](https://github.com/markuplint/markuplint/commit/6f78de8f503cb88f4e3e433989318fdff83e18f5)), closes [#4571](https://github.com/markuplint/markuplint/issues/4571)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **parser-utils:** let a parser declare slotElement ([c6f97c5](https://github.com/markuplint/markuplint/commit/c6f97c5cd4f190843c00d1d8e89fbff4ca9097db))
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [5.5.0](https://github.com/markuplint/markuplint/compare/v5.4.0...v5.5.0) (2026-11-10)
|
|
7
18
|
|
|
8
19
|
### Bug Fixes
|
package/lib/idl-attributes.js
CHANGED
package/lib/parser.d.ts
CHANGED
|
@@ -78,6 +78,10 @@ export declare abstract class Parser<Node extends {} = {}, State extends unknown
|
|
|
78
78
|
* of `@markuplint/ml-core`. See {@link MLParser.literalValues}.
|
|
79
79
|
*/
|
|
80
80
|
get literalValues(): LiteralValueDeclaration | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* What the `slot` element is in the language of the parser. See {@link MLParser.slotElement}.
|
|
83
|
+
*/
|
|
84
|
+
get slotElement(): 'html' | 'framework';
|
|
81
85
|
/**
|
|
82
86
|
* The end tag omittable type.
|
|
83
87
|
*
|
package/lib/parser.js
CHANGED
|
@@ -68,6 +68,7 @@ export class Parser {
|
|
|
68
68
|
#booleanish = false;
|
|
69
69
|
#attrExpressionLanguage;
|
|
70
70
|
#literalValues;
|
|
71
|
+
#slotElement = 'html';
|
|
71
72
|
#defaultState;
|
|
72
73
|
#endTagType = 'omittable';
|
|
73
74
|
#ignoreTags = [];
|
|
@@ -115,6 +116,7 @@ export class Parser {
|
|
|
115
116
|
this.#booleanish = options?.booleanish ?? this.#booleanish;
|
|
116
117
|
this.#attrExpressionLanguage = options?.attrExpressionLanguage ?? this.#attrExpressionLanguage;
|
|
117
118
|
this.#literalValues = options?.literalValues ?? this.#literalValues;
|
|
119
|
+
this.#slotElement = options?.slotElement ?? this.#slotElement;
|
|
118
120
|
this.#endTagType = options?.endTagType ?? this.#endTagType;
|
|
119
121
|
this.#ignoreTags = options?.ignoreTags ?? this.#ignoreTags;
|
|
120
122
|
this.#maskChar = options?.maskChar ?? this.#maskChar;
|
|
@@ -163,6 +165,12 @@ export class Parser {
|
|
|
163
165
|
get literalValues() {
|
|
164
166
|
return this.#literalValues;
|
|
165
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* What the `slot` element is in the language of the parser. See {@link MLParser.slotElement}.
|
|
170
|
+
*/
|
|
171
|
+
get slotElement() {
|
|
172
|
+
return this.#slotElement;
|
|
173
|
+
}
|
|
166
174
|
/**
|
|
167
175
|
* The end tag omittable type.
|
|
168
176
|
*
|
package/lib/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type ParserOptions = {
|
|
|
7
7
|
readonly booleanish?: boolean;
|
|
8
8
|
readonly attrExpressionLanguage?: ExpressionLanguage;
|
|
9
9
|
readonly literalValues?: LiteralValueDeclaration;
|
|
10
|
+
readonly slotElement?: 'html' | 'framework';
|
|
10
11
|
readonly endTagType?: EndTagType;
|
|
11
12
|
readonly ignoreTags?: readonly IgnoreTag[];
|
|
12
13
|
readonly maskChar?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/parser-utils",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"description": "Utility module for markuplint parser plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,19 +26,16 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"typedoc": {
|
|
30
|
-
"entryPoint": "./src/index.ts"
|
|
31
|
-
},
|
|
32
29
|
"scripts": {
|
|
33
30
|
"build": "tsc --project tsconfig.build.json",
|
|
34
31
|
"dev": "tsc --watch --project tsconfig.build.json",
|
|
35
32
|
"clean": "tsc --build --clean tsconfig.build.json"
|
|
36
33
|
},
|
|
37
34
|
"dependencies": {
|
|
38
|
-
"@markuplint/ml-ast": "5.
|
|
39
|
-
"@markuplint/ml-spec": "5.
|
|
40
|
-
"@markuplint/shared": "5.
|
|
41
|
-
"@markuplint/types": "5.
|
|
35
|
+
"@markuplint/ml-ast": "5.6.0",
|
|
36
|
+
"@markuplint/ml-spec": "5.6.0",
|
|
37
|
+
"@markuplint/shared": "5.6.0",
|
|
38
|
+
"@markuplint/types": "5.6.0",
|
|
42
39
|
"debug": "^4.4.3",
|
|
43
40
|
"espree": "^11.2.0",
|
|
44
41
|
"type-fest": "^5.10.0"
|
|
@@ -46,5 +43,5 @@
|
|
|
46
43
|
"devDependencies": {
|
|
47
44
|
"@typescript-eslint/typescript-estree": "8.72.1"
|
|
48
45
|
},
|
|
49
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "eade3d7202682e567f3c1b6985478f1d4b5c5481"
|
|
50
47
|
}
|