@@ -13,6 +13,7 @@ import { ScopeTypeInfo, ScopeTypeInfoEventCallback } from "..";
13
13
14
14
import { CustomSpokenFormGenerator } from "../generateSpokenForm/CustomSpokenFormGenerator" ;
15
15
import { scopeTypeToString } from "./scopeTypeToString" ;
16
+ import { SpeakableSurroundingPairName } from "../SpokenFormMap" ;
16
17
17
18
export const spokenFormsPath = path . join (
18
19
homedir ( ) ,
@@ -68,7 +69,7 @@ export class ScopeInfoProvider {
68
69
private updateScopeTypeInfos ( ) : void {
69
70
const scopeTypes : ScopeType [ ] = [
70
71
...simpleScopeTypeTypes
71
- // Ignore instance pseudo-scope for now
72
+ // Ignore instance pseudo-scope because it's not really a scope
72
73
// Skip "string" because we use surrounding pair for that
73
74
. filter (
74
75
( scopeTypeType ) =>
@@ -78,12 +79,21 @@ export class ScopeInfoProvider {
78
79
type : scopeTypeType ,
79
80
} ) ) ,
80
81
81
- ...surroundingPairNames . map (
82
- ( surroundingPairName ) : SurroundingPairScopeType => ( {
83
- type : "surroundingPair" ,
84
- delimiter : surroundingPairName ,
85
- } ) ,
86
- ) ,
82
+ ...surroundingPairNames
83
+ . filter (
84
+ (
85
+ surroundingPairName ,
86
+ ) : surroundingPairName is Exclude <
87
+ SpeakableSurroundingPairName ,
88
+ "whitespace"
89
+ > => surroundingPairName !== "collectionBoundary" ,
90
+ )
91
+ . map (
92
+ ( surroundingPairName ) : SurroundingPairScopeType => ( {
93
+ type : "surroundingPair" ,
94
+ delimiter : surroundingPairName ,
95
+ } ) ,
96
+ ) ,
87
97
88
98
...this . customSpokenFormGenerator . getCustomRegexScopeTypes ( ) ,
89
99
] ;
0 commit comments