Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a foreach that seems to trigger the debugger #2695

Merged
merged 2 commits into from Jun 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/src/markdown_processor.dart
Expand Up @@ -1089,7 +1089,7 @@ final RegExp allAfterLastNewline = RegExp(r'\n.*$', multiLine: true);
// https://github.com/dart-lang/dartdoc/issues/1250#issuecomment-269257942
void showWarningsForGenericsOutsideSquareBracketsBlocks(
String text, Warnable element) {
findFreeHangingGenericsPositions(text).forEach((int position) {
for (var position in findFreeHangingGenericsPositions(text)) {
var priorContext =
'${text.substring(max(position - maxPriorContext, 0), position)}';
var postContext =
Expand All @@ -1099,7 +1099,7 @@ void showWarningsForGenericsOutsideSquareBracketsBlocks(
var errorMessage = '$priorContext$postContext';
// TODO(jcollins-g): allow for more specific error location inside comments
element.warn(PackageWarning.typeAsHtml, message: errorMessage);
});
}
}

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