@markuplint/parser-utils 5.5.0 → 5.6.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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
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.1](https://github.com/markuplint/markuplint/compare/v5.6.0...v5.6.1) (2026-11-13)
7
+
8
+ **Note:** Version bump only for package @markuplint/parser-utils
9
+
10
+
11
+
12
+
13
+
14
+ # [5.6.0](https://github.com/markuplint/markuplint/compare/v5.5.0...v5.6.0) (2026-11-12)
15
+
16
+ ### Bug Fixes
17
+
18
+ * **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)
19
+
20
+ ### Features
21
+
22
+ * **parser-utils:** let a parser declare slotElement ([c6f97c5](https://github.com/markuplint/markuplint/commit/c6f97c5cd4f190843c00d1d8e89fbff4ca9097db))
23
+
24
+
6
25
  # [5.5.0](https://github.com/markuplint/markuplint/compare/v5.4.0...v5.5.0) (2026-11-10)
7
26
 
8
27
  ### Bug Fixes
@@ -6,7 +6,7 @@
6
6
  const idlContentMap = {
7
7
  // HTML
8
8
  accept: 'accept',
9
- acceptCharset: 'acceptcharset',
9
+ acceptCharset: 'accept-charset',
10
10
  accessKey: 'accesskey',
11
11
  action: 'action',
12
12
  allowFullScreen: 'allowfullscreen',
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.5.0",
3
+ "version": "5.6.1",
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.5.0",
39
- "@markuplint/ml-spec": "5.5.0",
40
- "@markuplint/shared": "5.5.0",
41
- "@markuplint/types": "5.5.0",
35
+ "@markuplint/ml-ast": "5.6.0",
36
+ "@markuplint/ml-spec": "5.6.1",
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": "fedebcfd56eaec4642e68643b2f9e10750d810e1"
46
+ "gitHead": "a9245162df3699c4880469f493aaaf6103343d83"
50
47
  }