@markuplint/parser-utils 5.0.0-alpha.1 → 5.0.0-alpha.2
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/ARCHITECTURE.ja.md +2 -2
- package/ARCHITECTURE.md +4 -4
- package/CHANGELOG.md +6 -0
- package/lib/get-namespace.js +1 -1
- package/package.json +5 -5
package/ARCHITECTURE.ja.md
CHANGED
|
@@ -21,7 +21,7 @@ src/
|
|
|
21
21
|
├── debugger.ts — デバッグ・テスト用ユーティリティ
|
|
22
22
|
├── parser-error.ts — ParserError, TargetParserError, ConfigParserError
|
|
23
23
|
├── sort-nodes.ts — ノード位置ソート
|
|
24
|
-
├── const.ts — MASK_CHAR, SVG 要素リスト, defaultSpaces
|
|
24
|
+
├── const.ts — MASK_CHAR, SVG/MathML 要素リスト, defaultSpaces
|
|
25
25
|
├── get-location.ts — 行/列/オフセット計算ユーティリティ
|
|
26
26
|
└── decision.ts — カスタム要素名判定
|
|
27
27
|
```
|
|
@@ -99,7 +99,7 @@ flowchart TD
|
|
|
99
99
|
| `debugger.ts` | テスト・デバッグユーティリティ | `nodeListToDebugMaps`, `attributesToDebugMaps`, `nodeTreeDebugView` |
|
|
100
100
|
| `parser-error.ts` | エラークラス | `ParserError`, `TargetParserError`, `ConfigParserError` |
|
|
101
101
|
| `sort-nodes.ts` | ノードの位置ソート | `sortNodes` |
|
|
102
|
-
| `const.ts` | 定数 | `MASK_CHAR`, `svgElementList`, `defaultSpaces`
|
|
102
|
+
| `const.ts` | 定数 | `MASK_CHAR`, `svgElementList`, `mathmlElementList`, `defaultSpaces` |
|
|
103
103
|
| `get-location.ts` | 位置計算 | `getPosition`, `getEndLine`, `getEndCol`, `getEndPosition`, `getOffsetsFromCode` |
|
|
104
104
|
| `decision.ts` | カスタム要素名判定 | `isPotentialCustomElementName`, `isSVGElement` |
|
|
105
105
|
|
package/ARCHITECTURE.md
CHANGED
|
@@ -22,7 +22,7 @@ src/
|
|
|
22
22
|
├── debug.ts — Performance timer and debug logging via `debug` package
|
|
23
23
|
├── parser-error.ts — ParserError, TargetParserError, ConfigParserError
|
|
24
24
|
├── sort-nodes.ts — Node position sorting
|
|
25
|
-
├── const.ts — MASK_CHAR, SVG element
|
|
25
|
+
├── const.ts — MASK_CHAR, SVG/MathML element lists, defaultSpaces
|
|
26
26
|
├── get-location.ts — Line/column/offset calculation utilities
|
|
27
27
|
└── decision.ts — Custom element name detection
|
|
28
28
|
```
|
|
@@ -59,7 +59,7 @@ flowchart TD
|
|
|
59
59
|
parserError["parser-error.ts\nParserError hierarchy"]
|
|
60
60
|
sortNodes["sort-nodes.ts\nsortNodes()"]
|
|
61
61
|
getLoc["get-location.ts\ngetPosition(), getEndLine()"]
|
|
62
|
-
constMod["const.ts\nMASK_CHAR, svgElementList"]
|
|
62
|
+
constMod["const.ts\nMASK_CHAR, svgElementList,\nmathmlElementList"]
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
subgraph external ["External Dependencies"]
|
|
@@ -112,9 +112,9 @@ flowchart TD
|
|
|
112
112
|
| `debug.ts` | Performance timing and debug logging | `PerformanceTimer`, `domLog`, `log` |
|
|
113
113
|
| `parser-error.ts` | Error classes with positional information | `ParserError`, `TargetParserError`, `ConfigParserError` |
|
|
114
114
|
| `sort-nodes.ts` | Node position sorting by offset | `sortNodes` |
|
|
115
|
-
| `const.ts` | Constants used across the package | `MASK_CHAR`, `svgElementList`, `defaultSpaces`
|
|
115
|
+
| `const.ts` | Constants used across the package | `MASK_CHAR`, `svgElementList`, `mathmlElementList`, `defaultSpaces` |
|
|
116
116
|
| `get-location.ts` | Line/column/offset position calculations | `getPosition`, `getEndLine`, `getEndCol`, `getEndPosition`, `getOffsetsFromCode` |
|
|
117
|
-
| `decision.ts` | Custom element name detection and SVG element lookup
|
|
117
|
+
| `decision.ts` | Custom element name detection and SVG/MathML element lookup | `isPotentialCustomElementName`, `isSVGElement` |
|
|
118
118
|
|
|
119
119
|
## Parse Pipeline Overview
|
|
120
120
|
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.0.0-alpha.2](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.1...v5.0.0-alpha.2) (2026-02-23)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **parser-utils:** add MathML namespace detection ([6c27e45](https://github.com/markuplint/markuplint/commit/6c27e45475104d744a8109e8e36698bd9dba4e8b))
|
|
11
|
+
|
|
6
12
|
# [5.0.0-alpha.1](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.0...v5.0.0-alpha.1) (2026-02-22)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/lib/get-namespace.js
CHANGED
|
@@ -25,7 +25,7 @@ function getParentNamespace(parentNode) {
|
|
|
25
25
|
return 'http://www.w3.org/1999/xhtml';
|
|
26
26
|
}
|
|
27
27
|
if ('namespace' in parentNode && parentNode.namespace) {
|
|
28
|
-
const ns = parentNode.namespace.
|
|
28
|
+
const ns = parentNode.namespace.trim();
|
|
29
29
|
return ns === 'http://www.w3.org/1999/xhtml'
|
|
30
30
|
? 'http://www.w3.org/1999/xhtml'
|
|
31
31
|
: ns === 'http://www.w3.org/2000/svg'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/parser-utils",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.2",
|
|
4
4
|
"description": "Utility module for markuplint parser plugin",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"clean": "tsc --build --clean tsconfig.build.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@markuplint/ml-ast": "5.0.0-alpha.
|
|
35
|
-
"@markuplint/ml-spec": "5.0.0-alpha.
|
|
36
|
-
"@markuplint/types": "5.0.0-alpha.
|
|
34
|
+
"@markuplint/ml-ast": "5.0.0-alpha.2",
|
|
35
|
+
"@markuplint/ml-spec": "5.0.0-alpha.2",
|
|
36
|
+
"@markuplint/types": "5.0.0-alpha.2",
|
|
37
37
|
"debug": "4.4.3",
|
|
38
38
|
"espree": "11.1.1",
|
|
39
39
|
"type-fest": "5.4.4"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@typescript-eslint/typescript-estree": "8.56.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "31ccf1e81443ea3f93597d287595211f1823ddcf"
|
|
45
45
|
}
|