Skip to content

Commit 70df3e6

Browse files
Fix bug where some scope fixtures were missing empty line after divider
1 parent 733353f commit 70df3e6

24 files changed

Lines changed: 26 additions & 2 deletions

‎packages/app-web-docs/src/docs/contributing/scope-test-format.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Example of `.scope` file for the javascript statement scope.
99
```
1010
const value = 0;
1111
---
12+
1213
[Content] =
1314
[Removal] =
1415
[Domain] = 0:0-0:16
@@ -25,6 +26,7 @@ General layout of a `.scope` file is:
2526
```
2627
Source code
2728
---
29+
2830
Scopes
2931
```
3032

‎packages/lib-engine/src/testUtil/serializeScopeFixture.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ function serializeScopeFixtureHelper(
5151
codeLines: string[],
5252
scopes: string[],
5353
): string {
54-
const serializedScopes = scopes.join("\n\n");
54+
const serializedScopes = scopes.join("\n\n").trimStart();
5555

56-
return [...codeLines, "---", serializedScopes, ""].join("\n");
56+
return [...codeLines, "---", "", serializedScopes, ""].join("\n");
5757
}
5858

5959
function serializeScope(

‎resources/fixtures/scopes/c/disqualifyDelimiter.scope‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ a <<= 2;
88
a >>= 2;
99
foo->bar;
1010
---
11+
1112
[#1 Content] = 0:2-0:3
1213
>-<
1314
0| 1 < 2;

‎resources/fixtures/scopes/clojure/disqualifyDelimiter.scope‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
(<= 1 2)
44
(>= 1 2)
55
---
6+
67
[#1 Content] = 0:1-0:2
78
>-<
89
0| (< 1 2)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
auto max() -> int;
22
---
3+
34
[Content] = 0:11-0:13
45
>--<
56
0| auto max() -> int;

‎resources/fixtures/scopes/csharp/disqualifyDelimiter.scope‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ a >>= 2;
99
() => 2;
1010
foo->bar;
1111
---
12+
1213
[#1 Content] = 0:2-0:3
1314
>-<
1415
0| 1 < 2;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
div > div {}
22
---
3+
34
[Content] = 0:4-0:5
45
>-<
56
0| div > div {}

‎resources/fixtures/scopes/dart/disqualifyDelimiter.scope‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Foo {
1515
int get bar => 0;
1616
}
1717
---
18+
1819
[#1 Content] = 1:6-1:7
1920
>-<
2021
1| 1 < 2;

‎resources/fixtures/scopes/go/disqualifyDelimiter.scope‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ a >>= 2
99
ch <- 2
1010
msg := <- ch
1111
---
12+
1213
[#1 Content] = 0:2-0:3
1314
>-<
1415
0| 1 < 2

‎resources/fixtures/scopes/java/disqualifyDelimiter.scope‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ switch (value) {
1313
case a -> 2
1414
}
1515
---
16+
1617
[#1 Content] = 0:2-0:3
1718
>-<
1819
0| 1 < 2;

0 commit comments

Comments
 (0)