File tree Expand file tree Collapse file tree 9 files changed +36
-20
lines changed Expand file tree Collapse file tree 9 files changed +36
-20
lines changed Original file line number Diff line number Diff line change @@ -144,10 +144,10 @@ final HtmlEscape htmlEscape = const HtmlEscape(HtmlEscapeMode.element);
144
144
final List <md.InlineSyntax > _markdown_syntaxes = [
145
145
new _InlineCodeSyntax (),
146
146
new _AutolinkWithoutScheme ()
147
- ]..addAll (md.ExtensionSet .gitHubFlavored .inlineSyntaxes);
147
+ ]..addAll (md.ExtensionSet .gitHubWeb .inlineSyntaxes);
148
148
149
149
final List <md.BlockSyntax > _markdown_block_syntaxes = []
150
- ..addAll (md.ExtensionSet .gitHubFlavored .blockSyntaxes);
150
+ ..addAll (md.ExtensionSet .gitHubWeb .blockSyntaxes);
151
151
152
152
// Remove these schemas from the display text for hyperlinks.
153
153
final RegExp _hide_schemes = new RegExp ('^(http|https)://' );
Original file line number Diff line number Diff line change @@ -23,9 +23,11 @@ Uri get _currentFileUri =>
23
23
24
24
String get _testPackageDocsPath {
25
25
if (Platform .version.split (' ' ).first.contains ('-' )) {
26
- return pathLib.fromUri (_currentFileUri.resolve ('../testing/test_package_docs_dev' ));
26
+ return pathLib
27
+ .fromUri (_currentFileUri.resolve ('../testing/test_package_docs_dev' ));
27
28
} else {
28
- return pathLib.fromUri (_currentFileUri.resolve ('../testing/test_package_docs' ));
29
+ return pathLib
30
+ .fromUri (_currentFileUri.resolve ('../testing/test_package_docs' ));
29
31
}
30
32
}
31
33
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ void main() {
250
250
251
251
test ('documentation can be rendered as HTML' , () {
252
252
expect (packageGraph.defaultPackage.documentationAsHtml,
253
- contains ('<h1>Best Package</h1>' ));
253
+ contains ('<h1 id="best-package" >Best Package</h1>' ));
254
254
});
255
255
256
256
test ('sdk name' , () {
Original file line number Diff line number Diff line change 1
1
# Best Package
2
2
3
+ * [ Examples] ( #examples )
4
+ * [ Another Section] ( #another-section )
5
+
3
6
This is an amazing package.
4
7
8
+
9
+ ## Examples
10
+
5
11
For example, it:
6
12
7
13
* Is very fast
@@ -56,6 +62,8 @@ var f = function(a, b) {
56
62
};
57
63
```
58
64
65
+ ## Another Section
66
+
59
67
It sometimes generates warnings in commentRefs like this: [ unknownThingy.FromSomewhere]
60
68
61
69
Be sure to check out other awesome packages on [ pub] [ ] .
Original file line number Diff line number Diff line change @@ -61,19 +61,19 @@ <h5><span class="package-name">test_package</span> <span class="package-kind">pa
61
61
< h1 > fake library</ h1 >
62
62
63
63
< section class ="desc markdown ">
64
- < h1 > WOW FAKE PACKAGE IS < strong > BEST</ strong > < a href ="http://example.org "> PACKAGE</ a > </ h1 >
64
+ < h1 id =" wow-fake-package-is-__best__-packagepkg " > WOW FAKE PACKAGE IS < strong > BEST</ strong > < a href ="http://example.org "> PACKAGE</ a > </ h1 >
65
65
< p > If you don't have this package yet, get it.
66
66
Don't ask questions.</ p >
67
67
< p > Testing code < code > true</ code > and < code > false</ code > </ p >
68
68
< p > Testing string escaping: < code > var s = 'I am a string'</ code > </ p >
69
69
< p > My favorite class is < a href ="fake/Cool-class.html "> Cool</ a > .</ p >
70
- < h2 > I am an h2</ h2 >
70
+ < h2 id =" i-am-an-h2 " > I am an h2</ h2 >
71
71
< p > hello there</ p >
72
- < h3 > I am an h3</ h3 >
72
+ < h3 id =" i-am-an-h3 " > I am an h3</ h3 >
73
73
< p > hello there</ p >
74
- < h4 > I am an h4</ h4 >
74
+ < h4 id =" i-am-an-h4 " > I am an h4</ h4 >
75
75
< p > hello there</ p >
76
- < h5 > I am an h5</ h5 >
76
+ < h5 id =" i-am-an-h5 " > I am an h5</ h5 >
77
77
< p > hello</ p >
78
78
< p > < em > Why should you get this package?</ em > </ p > < ul > < li > We told you so.</ li > < li > Everyone is doing it.</ li > < li > It smells nice.</ li > </ ul >
79
79
< pre class ="language-dart "> < code > class Foo {
Original file line number Diff line number Diff line change @@ -56,8 +56,9 @@ <h5><span class="package-name">test_package</span> <span class="package-kind">pa
56
56
57
57
< div class ="col-xs-12 col-sm-9 col-md-8 main-content ">
58
58
< section class ="desc markdown ">
59
- < h1 > Best Package</ h1 >
59
+ < h1 id =" best-package " > Best Package</ h1 > < ul > < li > < a href =" #examples " > Examples </ a > </ li > < li > < a href =" #another-section " > Another Section </ a > </ li > </ ul >
60
60
< p > This is an amazing package.</ p >
61
+ < h2 id ="examples "> Examples</ h2 >
61
62
< p > For example, it:</ p > < ul > < li > Is very fast</ li > < li > Has zero bugs</ li > < li > Is free</ li > </ ul >
62
63
< p > It also has some awesome code</ p >
63
64
< pre class ="language-dart "> < code class ="language-dart "> void main() {
@@ -96,6 +97,7 @@ <h1>Best Package</h1>
96
97
return a + b;
97
98
};
98
99
</ code > </ pre >
100
+ < h2 id ="another-section "> Another Section</ h2 >
99
101
< p > It sometimes generates warnings in commentRefs like this: < code > unknownThingy.FromSomewhere</ code > </ p >
100
102
< p > Be sure to check out other awesome packages on < a href ="https://pub.dartlang.org "> pub</ a > .</ p >
101
103
</ section >
Original file line number Diff line number Diff line change @@ -61,19 +61,19 @@ <h5><span class="package-name">test_package</span> <span class="package-kind">pa
61
61
< h1 > fake library</ h1 >
62
62
63
63
< section class ="desc markdown ">
64
- < h1 > WOW FAKE PACKAGE IS < strong > BEST</ strong > < a href ="http://example.org "> PACKAGE</ a > </ h1 >
64
+ < h1 id =" wow-fake-package-is-__best__-packagepkg " > WOW FAKE PACKAGE IS < strong > BEST</ strong > < a href ="http://example.org "> PACKAGE</ a > </ h1 >
65
65
< p > If you don't have this package yet, get it.
66
66
Don't ask questions.</ p >
67
67
< p > Testing code < code > true</ code > and < code > false</ code > </ p >
68
68
< p > Testing string escaping: < code > var s = 'I am a string'</ code > </ p >
69
69
< p > My favorite class is < a href ="fake/Cool-class.html "> Cool</ a > .</ p >
70
- < h2 > I am an h2</ h2 >
70
+ < h2 id =" i-am-an-h2 " > I am an h2</ h2 >
71
71
< p > hello there</ p >
72
- < h3 > I am an h3</ h3 >
72
+ < h3 id =" i-am-an-h3 " > I am an h3</ h3 >
73
73
< p > hello there</ p >
74
- < h4 > I am an h4</ h4 >
74
+ < h4 id =" i-am-an-h4 " > I am an h4</ h4 >
75
75
< p > hello there</ p >
76
- < h5 > I am an h5</ h5 >
76
+ < h5 id =" i-am-an-h5 " > I am an h5</ h5 >
77
77
< p > hello</ p >
78
78
< p > < em > Why should you get this package?</ em > </ p > < ul > < li > We told you so.</ li > < li > Everyone is doing it.</ li > < li > It smells nice.</ li > </ ul >
79
79
< pre class ="language-dart "> < code > class Foo {
Original file line number Diff line number Diff line change @@ -56,8 +56,9 @@ <h5><span class="package-name">test_package</span> <span class="package-kind">pa
56
56
57
57
< div class ="col-xs-12 col-sm-9 col-md-8 main-content ">
58
58
< section class ="desc markdown ">
59
- < h1 > Best Package</ h1 >
59
+ < h1 id =" best-package " > Best Package</ h1 > < ul > < li > < a href =" #examples " > Examples </ a > </ li > < li > < a href =" #another-section " > Another Section </ a > </ li > </ ul >
60
60
< p > This is an amazing package.</ p >
61
+ < h2 id ="examples "> Examples</ h2 >
61
62
< p > For example, it:</ p > < ul > < li > Is very fast</ li > < li > Has zero bugs</ li > < li > Is free</ li > </ ul >
62
63
< p > It also has some awesome code</ p >
63
64
< pre class ="language-dart "> < code class ="language-dart "> void main() {
@@ -96,6 +97,7 @@ <h1>Best Package</h1>
96
97
return a + b;
97
98
};
98
99
</ code > </ pre >
100
+ < h2 id ="another-section "> Another Section</ h2 >
99
101
< p > It sometimes generates warnings in commentRefs like this: < code > unknownThingy.FromSomewhere</ code > </ p >
100
102
< p > Be sure to check out other awesome packages on < a href ="https://pub.dartlang.org "> pub</ a > .</ p >
101
103
</ section >
Original file line number Diff line number Diff line change @@ -879,9 +879,11 @@ testDartdocFlutterPlugin() async {
879
879
@Task ('update test_package_docs' )
880
880
updateTestPackageDocs () async {
881
881
var launcher = new SubprocessLauncher ('update-test-package-docs' );
882
- var testPackageDocs =
883
- new Directory (pathLib.join ('testing' ,
884
- Platform .version.split (' ' ).first.contains ('-' ) ? 'test_package_docs_dev' : 'test_package_docs' ));
882
+ var testPackageDocs = new Directory (pathLib.join (
883
+ 'testing' ,
884
+ Platform .version.split (' ' ).first.contains ('-' )
885
+ ? 'test_package_docs_dev'
886
+ : 'test_package_docs' ));
885
887
var testPackage = new Directory (pathLib.join ('testing' , 'test_package' ));
886
888
await launcher.runStreamed (sdkBin ('pub' ), ['get' ],
887
889
workingDirectory: testPackage.path);
You can’t perform that action at this time.
0 commit comments