File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/services/Elastic.Documentation.Services Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -495,15 +495,13 @@ AccessViolationException or
495495 private static List < string > MapLabelsToAreas ( string [ ] labels , Dictionary < string , string > labelToAreasMapping )
496496 {
497497 var areas = new HashSet < string > ( ) ;
498- foreach ( var label in labels . Where ( label => labelToAreasMapping . ContainsKey ( label ) ) )
498+ var areaList = labels
499+ . Where ( label => labelToAreasMapping . ContainsKey ( label ) )
500+ . SelectMany ( label => labelToAreasMapping [ label ]
501+ . Split ( ',' , StringSplitOptions . RemoveEmptyEntries | StringSplitOptions . TrimEntries ) ) ;
502+ foreach ( var area in areaList )
499503 {
500- var mappedAreas = labelToAreasMapping [ label ] ;
501- // Support comma-separated areas
502- var areaList = mappedAreas . Split ( ',' , StringSplitOptions . RemoveEmptyEntries | StringSplitOptions . TrimEntries ) ;
503- foreach ( var area in areaList )
504- {
505- _ = areas . Add ( area ) ;
506- }
504+ _ = areas . Add ( area ) ;
507505 }
508506 return areas . ToList ( ) ;
509507 }
You can’t perform that action at this time.
0 commit comments