Skip to content

Commit fbaa09f

Browse files
committed
Add negatable to --inject-html option
1 parent 8286b14 commit fbaa09f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/src/dartdoc_options.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class DartdocOptionArgSynth<T> extends DartdocOption<T>
541541
bool hide = false,
542542
bool isDir = false,
543543
bool isFile = false,
544-
bool negatable,
544+
bool negatable = false,
545545
bool splitCommas})
546546
: super._(name, null, help, isDir, isFile, mustExist, null) {
547547
_hide = hide;
@@ -672,7 +672,7 @@ class DartdocOptionArgOnly<T> extends DartdocOption<T>
672672
bool hide = false,
673673
bool isDir = false,
674674
bool isFile = false,
675-
bool negatable,
675+
bool negatable = false,
676676
bool splitCommas})
677677
: super._(name, defaultsTo, help, isDir, isFile, mustExist, null) {
678678
_hide = hide;
@@ -707,7 +707,7 @@ class DartdocOptionArgFile<T> extends DartdocOption<T>
707707
bool hide = false,
708708
bool isDir = false,
709709
bool isFile = false,
710-
bool negatable,
710+
bool negatable = false,
711711
bool parentDirOverridesChild: false,
712712
bool splitCommas})
713713
: super._(name, defaultsTo, help, isDir, isFile, mustExist, null) {
@@ -1045,7 +1045,7 @@ abstract class _DartdocArgOption<T> implements DartdocOption<T> {
10451045
defaultsTo: defaultsTo as bool,
10461046
help: help,
10471047
hide: hide,
1048-
negatable: negatable);
1048+
negatable: negatable ?? false);
10491049
} else if (_isInt || _isDouble || _isString) {
10501050
argParser.addOption(argName,
10511051
abbr: abbr,
@@ -1256,7 +1256,8 @@ Future<List<DartdocOption>> createDartdocOptions() async {
12561256
new DartdocOptionArgOnly<bool>('includeSource', true,
12571257
help: 'Show source code blocks.', negatable: true),
12581258
new DartdocOptionArgOnly<bool>('injectHtml', false,
1259-
help: 'Allow the use of {@inject-html} directive to inject raw HTML.'),
1259+
help:
1260+
'Allow the use of the {@inject-html} directive to inject raw HTML into dartdoc output.'),
12601261
new DartdocOptionArgOnly<String>('input', Directory.current.path,
12611262
isDir: true, help: 'Path to source directory', mustExist: true),
12621263
new DartdocOptionSyntheticOnly<String>('inputDir',
@@ -1326,7 +1327,7 @@ Future<List<DartdocOption>> createDartdocOptions() async {
13261327
'A list of package names to place first when grouping libraries in packages. '
13271328
'Unmentioned packages are sorted after these.'),
13281329
new DartdocOptionArgOnly<bool>('sdkDocs', false,
1329-
help: 'Generate ONLY the docs for the Dart SDK.', negatable: false),
1330+
help: 'Generate ONLY the docs for the Dart SDK.'),
13301331
new DartdocOptionArgSynth<String>('sdkDir',
13311332
(DartdocSyntheticOption<String> option, Directory dir) {
13321333
if (!option.parent['sdkDocs'].valueAt(dir) &&
@@ -1344,7 +1345,7 @@ Future<List<DartdocOption>> createDartdocOptions() async {
13441345
new DartdocOptionArgFile<bool>('showUndocumentedCategories', false,
13451346
help: "Label categories that aren't documented", negatable: true),
13461347
new DartdocOptionArgOnly<bool>('showWarnings', false,
1347-
help: 'Display all warnings.', negatable: false),
1348+
help: 'Display all warnings.'),
13481349
new DartdocOptionSyntheticOnly<PackageMeta>('topLevelPackageMeta',
13491350
(DartdocSyntheticOption<PackageMeta> option, Directory dir) {
13501351
PackageMeta packageMeta = new PackageMeta.fromDir(
@@ -1360,8 +1361,7 @@ Future<List<DartdocOption>> createDartdocOptions() async {
13601361
return packageMeta;
13611362
}, help: 'PackageMeta object for the default package.'),
13621363
new DartdocOptionArgOnly<bool>('useCategories', true,
1363-
help: 'Display categories in the sidebar of packages',
1364-
negatable: false),
1364+
help: 'Display categories in the sidebar of packages'),
13651365
new DartdocOptionArgOnly<bool>('validateLinks', true,
13661366
help:
13671367
'Runs the built-in link checker to display Dart context aware warnings for broken links (slow)',

0 commit comments

Comments
 (0)