Skip to content

Commit be9ec8f

Browse files
Add missing html scope facets (#2851)
1 parent c10ba97 commit be9ec8f

File tree

5 files changed

+157
-12
lines changed

5 files changed

+157
-12
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div id="me"><div>
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:8-0:12
7+
>----<
8+
0| <div id="me"><div>
9+
10+
[Insertion delimiter] = " "
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--
2+
Hello world
3+
-->
4+
---
5+
6+
[Content] =
7+
[Removal] =
8+
[Domain] = 0:0-2:3
9+
>----
10+
0| <!--
11+
1| Hello world
12+
2| -->
13+
---<
14+
15+
[Insertion delimiter] = " "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div>hello<div>
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:5-0:10
7+
>-----<
8+
0| <div>hello<div>
9+
10+
[Insertion delimiter] = " "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div id="me"><div>
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:9-0:11
7+
>--<
8+
0| <div id="me"><div>
9+
10+
[Insertion delimiter] = " "

packages/common/src/scopeSupportFacets/html.ts

Lines changed: 112 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,156 @@ import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";
44
const { supported, notApplicable } = ScopeSupportFacetLevel;
55

66
export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
7-
element: supported,
8-
tags: supported,
9-
startTag: supported,
10-
endTag: supported,
11-
attribute: supported,
12-
"key.attribute": supported,
13-
"value.attribute": supported,
147
"comment.block": supported,
158
"interior.element": supported,
9+
"key.attribute": supported,
10+
"string.singleLine": supported,
11+
"textFragment.comment.block": supported,
12+
"textFragment.element": supported,
13+
"textFragment.string.singleLine": supported,
14+
"value.attribute": supported,
15+
attribute: supported,
16+
element: supported,
17+
endTag: supported,
18+
startTag: supported,
19+
tags: supported,
1620

17-
"argument.actual": notApplicable,
21+
// Not applicable
22+
23+
"argument.actual.constructor.iteration": notApplicable,
24+
"argument.actual.constructor": notApplicable,
1825
"argument.actual.iteration": notApplicable,
19-
"argument.formal": notApplicable,
26+
"argument.actual.method.iteration": notApplicable,
27+
"argument.actual.method": notApplicable,
28+
"argument.actual": notApplicable,
29+
"argument.formal.constructor.iteration": notApplicable,
30+
"argument.formal.constructor": notApplicable,
2031
"argument.formal.iteration": notApplicable,
32+
"argument.formal.method.iteration": notApplicable,
33+
"argument.formal.method": notApplicable,
34+
"argument.formal": notApplicable,
35+
"branch.if.iteration": notApplicable,
2136
"branch.if": notApplicable,
37+
"branch.loop": notApplicable,
38+
"branch.switchCase.iteration": notApplicable,
2239
"branch.switchCase": notApplicable,
40+
"branch.ternary": notApplicable,
41+
"branch.try.iteration": notApplicable,
2342
"branch.try": notApplicable,
43+
"class.iteration.block": notApplicable,
44+
"class.iteration.document": notApplicable,
45+
"className.iteration.block": notApplicable,
46+
"className.iteration.document": notApplicable,
47+
"collectionItem.unenclosed.iteration": notApplicable,
48+
"collectionItem.unenclosed": notApplicable,
2449
"comment.line": notApplicable,
2550
"condition.doWhile": notApplicable,
2651
"condition.for": notApplicable,
2752
"condition.if": notApplicable,
53+
"condition.switchCase.iteration": notApplicable,
2854
"condition.switchCase": notApplicable,
2955
"condition.ternary": notApplicable,
3056
"condition.while": notApplicable,
3157
"functionCall.constructor": notApplicable,
3258
"functionCallee.constructor": notApplicable,
59+
"functionName.constructor": notApplicable,
60+
"functionName.iteration.block": notApplicable,
61+
"functionName.iteration.document": notApplicable,
62+
"functionName.method.iteration.class": notApplicable,
63+
"functionName.method": notApplicable,
64+
"interior.cell": notApplicable,
65+
"interior.class": notApplicable,
66+
"interior.command": notApplicable,
67+
"interior.function": notApplicable,
68+
"interior.if": notApplicable,
69+
"interior.lambda": notApplicable,
70+
"interior.loop": notApplicable,
71+
"interior.resource": notApplicable,
72+
"interior.switchCase": notApplicable,
73+
"interior.ternary": notApplicable,
74+
"interior.try": notApplicable,
3375
"key.mapPair.iteration": notApplicable,
3476
"key.mapPair": notApplicable,
77+
"name.argument.actual.iteration": notApplicable,
78+
"name.argument.actual": notApplicable,
79+
"name.argument.formal.constructor.iteration": notApplicable,
80+
"name.argument.formal.constructor": notApplicable,
81+
"name.argument.formal.iteration": notApplicable,
82+
"name.argument.formal.method.iteration": notApplicable,
83+
"name.argument.formal.method": notApplicable,
84+
"name.argument.formal": notApplicable,
85+
"name.assignment.pattern": notApplicable,
3586
"name.assignment": notApplicable,
3687
"name.class": notApplicable,
88+
"name.constructor": notApplicable,
3789
"name.field": notApplicable,
3890
"name.foreach": notApplicable,
3991
"name.function": notApplicable,
92+
"name.iteration.block": notApplicable,
93+
"name.iteration.document": notApplicable,
94+
"name.method": notApplicable,
95+
"name.resource.iteration": notApplicable,
96+
"name.resource": notApplicable,
97+
"name.variable.pattern": notApplicable,
98+
"name.variable": notApplicable,
99+
"namedFunction.constructor": notApplicable,
100+
"namedFunction.iteration.block": notApplicable,
101+
"namedFunction.iteration.document": notApplicable,
102+
"namedFunction.method.iteration.class": notApplicable,
40103
"namedFunction.method": notApplicable,
104+
"section.iteration.document": notApplicable,
105+
"section.iteration.parent": notApplicable,
106+
"statement.class": notApplicable,
107+
"statement.iteration.block": notApplicable,
108+
"statement.iteration.document": notApplicable,
41109
"string.multiLine": notApplicable,
42-
"string.singleLine": notApplicable,
43-
"type.variable": notApplicable,
110+
"textFragment.comment.line": notApplicable,
111+
"textFragment.string.multiLine": notApplicable,
112+
"type.alias": notApplicable,
113+
"type.argument.formal.constructor.iteration": notApplicable,
114+
"type.argument.formal.constructor": notApplicable,
115+
"type.argument.formal.iteration": notApplicable,
116+
"type.argument.formal.method.iteration": notApplicable,
117+
"type.argument.formal.method": notApplicable,
118+
"type.argument.formal": notApplicable,
119+
"type.cast": notApplicable,
120+
"type.class": notApplicable,
121+
"type.enum": notApplicable,
122+
"type.field.iteration": notApplicable,
44123
"type.field": notApplicable,
45124
"type.foreach": notApplicable,
46-
"type.argument.formal": notApplicable,
47125
"type.interface": notApplicable,
48126
"type.return": notApplicable,
127+
"type.typeArgument.iteration": notApplicable,
128+
"type.typeArgument": notApplicable,
129+
"type.variable": notApplicable,
130+
"value.argument.actual.iteration": notApplicable,
131+
"value.argument.actual": notApplicable,
132+
"value.argument.formal.constructor.iteration": notApplicable,
133+
"value.argument.formal.constructor": notApplicable,
134+
"value.argument.formal.iteration": notApplicable,
135+
"value.argument.formal.method.iteration": notApplicable,
136+
"value.argument.formal.method": notApplicable,
137+
"value.argument.formal": notApplicable,
49138
"value.assignment": notApplicable,
50139
"value.field": notApplicable,
51140
"value.foreach": notApplicable,
52141
"value.mapPair.iteration": notApplicable,
53142
"value.mapPair": notApplicable,
143+
"value.resource.iteration": notApplicable,
144+
"value.resource": notApplicable,
54145
"value.return.lambda": notApplicable,
55146
"value.return": notApplicable,
147+
"value.typeAlias": notApplicable,
148+
"value.variable.pattern": notApplicable,
149+
"value.variable": notApplicable,
150+
"value.yield": notApplicable,
56151
anonymousFunction: notApplicable,
57152
class: notApplicable,
58153
className: notApplicable,
59154
command: notApplicable,
155+
disqualifyDelimiter: notApplicable,
156+
environment: notApplicable,
60157
fieldAccess: notApplicable,
61158
functionCall: notApplicable,
62159
functionCallee: notApplicable,
@@ -65,7 +162,10 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
65162
list: notApplicable,
66163
map: notApplicable,
67164
namedFunction: notApplicable,
165+
notebookCell: notApplicable,
166+
pairDelimiter: notApplicable,
68167
regularExpression: notApplicable,
168+
section: notApplicable,
69169
statement: notApplicable,
70170
switchStatementSubject: notApplicable,
71171
};

0 commit comments

Comments
 (0)