| Index: pkg/analyzer/lib/src/services/formatter_impl.dart
|
| diff --git a/pkg/analyzer/lib/src/services/formatter_impl.dart b/pkg/analyzer/lib/src/services/formatter_impl.dart
|
| index cfa81c9548c6d7ba4e0686d374724bceb2afb805..6998a192f97815273123532db5445b7875f47143 100644
|
| --- a/pkg/analyzer/lib/src/services/formatter_impl.dart
|
| +++ b/pkg/analyzer/lib/src/services/formatter_impl.dart
|
| @@ -1686,6 +1686,10 @@ class SourceVisitor implements AstVisitor {
|
| }
|
|
|
|
|
| + /// Test if this EOL [comment] is at the beginning of a line.
|
| + bool isAtBOL(Token comment) =>
|
| + lineInfo.getLocation(comment.offset).columnNumber == 1;
|
| +
|
| /// Test if this [comment] is at the end of a line.
|
| bool isAtEOL(Token comment) =>
|
| comment != null && comment.toString().trim().startsWith(twoSlashes) &&
|
| @@ -1701,6 +1705,11 @@ class SourceVisitor implements AstVisitor {
|
| }
|
| }
|
|
|
| + // Don't indent commented-out lines
|
| + if (isAtBOL(comment)) {
|
| + writer.currentLine.clear();
|
| + }
|
| +
|
| append(comment.toString().trim());
|
| }
|
|
|
|
|