@@ -163,7 +163,6 @@ class Documentation {
163
163
final String raw;
164
164
final String asHtml;
165
165
final String asOneLiner;
166
- final bool hasMoreThanOneLineDocs;
167
166
168
167
factory Documentation (String markdown) {
169
168
String tempHtml = _renderMarkdownToHtml (markdown);
@@ -175,8 +174,7 @@ class Documentation {
175
174
return new Documentation ._internal (element.documentation, tempHtml);
176
175
}
177
176
178
- Documentation ._(
179
- this .raw, this .asHtml, this .hasMoreThanOneLineDocs, this .asOneLiner);
177
+ Documentation ._(this .raw, this .asHtml, this .asOneLiner);
180
178
181
179
factory Documentation ._internal (String markdown, String rawHtml) {
182
180
var asHtmlDocument = parse (rawHtml);
@@ -206,18 +204,14 @@ class Documentation {
206
204
}
207
205
var asHtml = asHtmlDocument.body.innerHtml;
208
206
209
- // Fixes issue with line ending differences between mac and windows, affecting tests
207
+ // Fixes issue with line ending differences between mac and windows.
210
208
if (asHtml != null ) asHtml = asHtml.trim ();
211
209
212
- var asOneLiner = '' ;
213
- var moreThanOneLineDoc = asHtmlDocument.body.children.length > 1 ;
210
+ var asOneLiner = asHtmlDocument.body.children.isEmpty
211
+ ? ''
212
+ : asHtmlDocument.body.children.first.innerHtml;
214
213
215
- if (asHtmlDocument.body.children.isNotEmpty) {
216
- asOneLiner = asHtmlDocument.body.children.first.innerHtml;
217
- }
218
-
219
- return new Documentation ._(
220
- markdown, asHtml, moreThanOneLineDoc, asOneLiner);
214
+ return new Documentation ._(markdown, asHtml, asOneLiner);
221
215
}
222
216
}
223
217
0 commit comments