@markuplint/ml-spec 4.0.0-alpha.4 → 4.0.0-alpha.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/LICENSE
CHANGED
|
@@ -5,7 +5,7 @@ export function getExplicitRole(specs,
|
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
6
6
|
el, version) {
|
|
7
7
|
const roleValue = el.getAttribute('role');
|
|
8
|
-
const roleNames = roleValue?.toLowerCase().trim().split(/\s+/
|
|
8
|
+
const roleNames = roleValue?.toLowerCase().trim().split(/\s+/) ?? [];
|
|
9
9
|
const permittedRoles = getPermittedRoles(el, version, specs);
|
|
10
10
|
const { namespaceURI } = resolveNamespace(el.localName, el.namespaceURI);
|
|
11
11
|
let error = 'NO_EXPLICIT';
|
|
@@ -188,7 +188,7 @@ el) {
|
|
|
188
188
|
return false;
|
|
189
189
|
}
|
|
190
190
|
// TODO: Improve accuracy
|
|
191
|
-
return /display\s*:\s*none|visibility\s*:\s*hidden/
|
|
191
|
+
return /display\s*:\s*none|visibility\s*:\s*hidden/i.test(style);
|
|
192
192
|
}
|
|
193
193
|
function isExposedElement(
|
|
194
194
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
@@ -7,7 +7,7 @@ ownedEl, specs, version) {
|
|
|
7
7
|
function matchesCondition(condition,
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
9
9
|
parentEl, specs, version) {
|
|
10
|
-
const conditions = condition.split(/\s+>\s+/
|
|
10
|
+
const conditions = condition.split(/\s+>\s+/).reverse();
|
|
11
11
|
while (conditions.length > 0) {
|
|
12
12
|
if (!parentEl) {
|
|
13
13
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/ml-spec",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.5",
|
|
4
4
|
"description": "Types and schema that specs of the Markup languages for markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"schema": "run-s schema:*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@markuplint/ml-ast": "4.0.0-alpha.
|
|
34
|
-
"@markuplint/types": "4.0.0-alpha.
|
|
33
|
+
"@markuplint/ml-ast": "4.0.0-alpha.5",
|
|
34
|
+
"@markuplint/types": "4.0.0-alpha.5",
|
|
35
35
|
"dom-accessibility-api": "^0.6.3",
|
|
36
36
|
"is-plain-object": "^5.0.0",
|
|
37
37
|
"type-fest": "^4.5.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@markuplint/test-tools": "4.0.0-alpha.
|
|
40
|
+
"@markuplint/test-tools": "4.0.0-alpha.5",
|
|
41
41
|
"json-schema-to-typescript": "13.1.1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "0c3e4690662edf1765bcc4b6411ec5507c1e2ea3"
|
|
44
44
|
}
|