Skip to content

Commit 701fd8f

Browse files
authored
Remove a foreach that seems to trigger the debugger (#2695)
1 parent 20992ea commit 701fd8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/markdown_processor.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ final RegExp allAfterLastNewline = RegExp(r'\n.*$', multiLine: true);
10891089
// https://github.com/dart-lang/dartdoc/issues/1250#issuecomment-269257942
10901090
void showWarningsForGenericsOutsideSquareBracketsBlocks(
10911091
String text, Warnable element) {
1092-
findFreeHangingGenericsPositions(text).forEach((int position) {
1092+
for (var position in findFreeHangingGenericsPositions(text)) {
10931093
var priorContext =
10941094
'${text.substring(max(position - maxPriorContext, 0), position)}';
10951095
var postContext =
@@ -1099,7 +1099,7 @@ void showWarningsForGenericsOutsideSquareBracketsBlocks(
10991099
var errorMessage = '$priorContext$postContext';
11001100
// TODO(jcollins-g): allow for more specific error location inside comments
11011101
element.warn(PackageWarning.typeAsHtml, message: errorMessage);
1102-
});
1102+
}
11031103
}
11041104

11051105
Iterable<int> findFreeHangingGenericsPositions(String string) sync* {

0 commit comments

Comments
 (0)