Skip to content

Commit 7597201

Browse files
committed
Merge pull request #722 from dart-lang/devoncarew_readme3
fix an NPE when generating docs
2 parents 4d8d251 + 48b677a commit 7597201

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

.analysis_options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
analyzer:
44
exclude:
55
- test_package/doc/api
6+
- test_package_small/doc/api
67
- test_package_bad/
78
- doc/api/
89
- pub.dartlang.org/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
build/
33
doc/api/
44
test_package/doc
5+
test_package_small/doc
56
packages
67
.buildlog
78
.pub

lib/templates/_documentation.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<section class="desc markdown">
22

33
{{^hasDocumentation}}
4-
<p class="no-docs">Not documented.</p>
4+
<p class="no-docs">Not documented.</p>
5+
{{/hasDocumentation}}
6+
{{#hasDocumentation}}
7+
{{{ documentationAsHtml }}}
58
{{/hasDocumentation}}
6-
7-
{{{ documentationAsHtml }}}
89

910
</section>

test_package_small/lib/main.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
main(List<String> args) {
3+
print('Hello world!');
4+
}

test_package_small/pubspec.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: test_package_small
2+
version: 0.0.1
3+
description: A simple console application.
4+
#dependencies:
5+
# foo_bar: '>=1.0.0 <2.0.0'

tool/travis.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ else
2929
# Verify that the libraries are error free.
3030
grind analyze
3131

32-
# Another smoke test: Run dartdoc on test_package.
32+
# Run dartdoc on test_package.
3333
cd test_package
3434
dart -c ../bin/dartdoc.dart
3535
cd ..
3636

37+
# And on test_package_small.
38+
cd test_package_small
39+
dart -c ../bin/dartdoc.dart
40+
cd ..
41+
3742
# Run the tests.
3843
grind test
3944

0 commit comments

Comments
 (0)