File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 15
15
library dartdoc.dartdoc_options;
16
16
17
17
import 'dart:async' ;
18
- import 'dart:io' show Platform;
18
+ import 'dart:io' show Platform, stdout ;
19
19
20
20
import 'package:analyzer/dart/element/element.dart' ;
21
21
import 'package:analyzer/file_system/file_system.dart' ;
@@ -39,6 +39,8 @@ const int _kIntVal = 0;
39
39
const double _kDoubleVal = 0.0 ;
40
40
const bool _kBoolVal = true ;
41
41
42
+ int get _usageLineLength => stdout.hasTerminal ? stdout.terminalColumns : null ;
43
+
42
44
typedef ConvertYamlToType <T > = T Function (YamlMap , String , ResourceProvider );
43
45
44
46
class DartdocOptionError extends DartdocFailure {
@@ -555,7 +557,7 @@ abstract class DartdocOption<T> {
555
557
Map <String , _YamlFileData > get _yamlAtCanonicalPathCache =>
556
558
root.__yamlAtCanonicalPathCache;
557
559
558
- final ArgParser __argParser = ArgParser (usageLineLength: 80 );
560
+ final ArgParser __argParser = ArgParser (usageLineLength: _usageLineLength );
559
561
560
562
ArgParser get argParser => root.__argParser;
561
563
@@ -1546,7 +1548,7 @@ Future<List<DartdocOption<Object>>> createDartdocOptions(
1546
1548
'dart.html' ,
1547
1549
'dart.indexed_db' ,
1548
1550
'dart.io' ,
1549
- 'dart.lisolate ' ,
1551
+ 'dart.isolate ' ,
1550
1552
'dart.js' ,
1551
1553
'dart.js_util' ,
1552
1554
'dart.math' ,
You can’t perform that action at this time.
0 commit comments