File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
frontend/src/ts/test/funbox Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ export function areFunboxesCompatible(funboxesString: string): boolean {
136136 const oneCharReplacerMax =
137137 funboxesToCheck . filter ( ( f ) => f . frontendFunctions ?. includes ( "getWordHtml" ) )
138138 . length <= 1 ;
139+ const oneChangesCapitalisationMax =
140+ funboxesToCheck . filter ( ( f ) =>
141+ f . properties ?. find ( ( fp ) => fp === "changesCapitalisation" )
142+ ) . length <= 1 ;
139143 const allowedConfig = { } as Record < string , string [ ] | boolean [ ] > ;
140144 let noConfigConflicts = true ;
141145 for ( const f of funboxesToCheck ) {
@@ -174,6 +178,7 @@ export function areFunboxesCompatible(funboxesString: string): boolean {
174178 onePunctuateWordMax &&
175179 oneCharCheckerMax &&
176180 oneCharReplacerMax &&
181+ oneChangesCapitalisationMax &&
177182 noConfigConflicts &&
178183 oneWordOrderMax
179184 ) ;
Original file line number Diff line number Diff line change @@ -296,6 +296,10 @@ export function areFunboxesCompatible(
296296 funboxesToCheck . filter ( ( f ) => f . functions ?. isCharCorrect ) . length <= 1 ;
297297 const oneCharReplacerMax =
298298 funboxesToCheck . filter ( ( f ) => f . functions ?. getWordHtml ) . length <= 1 ;
299+ const oneChangesCapitalisationMax =
300+ funboxesToCheck . filter ( ( f ) =>
301+ f . properties ?. find ( ( fp ) => fp === "changesCapitalisation" )
302+ ) . length <= 1 ;
299303 const allowedConfig = { } as FunboxForcedConfig ;
300304 let noConfigConflicts = true ;
301305 for ( const f of funboxesToCheck ) {
@@ -335,6 +339,7 @@ export function areFunboxesCompatible(
335339 onePunctuateWordMax &&
336340 oneCharCheckerMax &&
337341 oneCharReplacerMax &&
342+ oneChangesCapitalisationMax &&
338343 noConfigConflicts
339344 ) ;
340345}
You can’t perform that action at this time.
0 commit comments