Skip to content

Commit fca0593

Browse files
authored
More redundant newline elimination, prepare for 0.8.1+3 (#333)
1 parent eeb0dbe commit fca0593

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.8.1+3
2+
3+
* More redundant new lines elimination.
4+
15
## 0.8.1+2
26

37
* Eliminate redundant new lines in the core builder. These were almost removed

lib/src/builder.dart

+2-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class _Builder extends Builder {
4545
},
4646
_isStandalone = isStandalone,
4747
formatOutput = formatOutput ?? _formatter.format,
48-
_header = header ?? defaultFileHeader {
48+
_header = (header ?? defaultFileHeader).trim() {
4949
if (_generatedExtension == null) {
5050
throw new ArgumentError.notNull('generatedExtension');
5151
}
@@ -107,7 +107,6 @@ class _Builder extends Builder {
107107
}
108108
contentBuffer.writeln();
109109
contentBuffer.writeln('part of $name;');
110-
contentBuffer.writeln();
111110
}
112111

113112
for (var output in generatedOutputs) {
@@ -226,7 +225,6 @@ Stream<GeneratedOutput> _generate(LibraryElement library,
226225

227226
final _formatter = new DartFormatter();
228227

229-
const defaultFileHeader = '''// GENERATED CODE - DO NOT MODIFY BY HAND
230-
''';
228+
const defaultFileHeader = '// GENERATED CODE - DO NOT MODIFY BY HAND';
231229

232230
final _headerLine = '// '.padRight(77, '*');

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: source_gen
2-
version: 0.8.1+2
2+
version: 0.8.1+3
33
author: Dart Team <[email protected]>
44
description: Automated source code generation for Dart.
55
homepage: https://github.com/dart-lang/source_gen

0 commit comments

Comments
 (0)