@@ -13,6 +13,7 @@ import { ScopeTypeInfo, ScopeTypeInfoEventCallback } from "..";
1313
1414import { CustomSpokenFormGenerator } from "../generateSpokenForm/CustomSpokenFormGenerator" ;
1515import { scopeTypeToString } from "./scopeTypeToString" ;
16+ import { SpeakableSurroundingPairName } from "../SpokenFormMap" ;
1617
1718export const spokenFormsPath = path . join (
1819 homedir ( ) ,
@@ -68,7 +69,7 @@ export class ScopeInfoProvider {
6869 private updateScopeTypeInfos ( ) : void {
6970 const scopeTypes : ScopeType [ ] = [
7071 ...simpleScopeTypeTypes
71- // Ignore instance pseudo-scope for now
72+ // Ignore instance pseudo-scope because it's not really a scope
7273 // Skip "string" because we use surrounding pair for that
7374 . filter (
7475 ( scopeTypeType ) =>
@@ -78,12 +79,21 @@ export class ScopeInfoProvider {
7879 type : scopeTypeType ,
7980 } ) ) ,
8081
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+ ) ,
8797
8898 ...this . customSpokenFormGenerator . getCustomRegexScopeTypes ( ) ,
8999 ] ;
0 commit comments