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);
144144final List <md.InlineSyntax > _markdown_syntaxes = [
145145 new _InlineCodeSyntax (),
146146 new _AutolinkWithoutScheme ()
147- ]..addAll (md.ExtensionSet .gitHubFlavored .inlineSyntaxes);
147+ ]..addAll (md.ExtensionSet .gitHubWeb .inlineSyntaxes);
148148
149149final List <md.BlockSyntax > _markdown_block_syntaxes = []
150- ..addAll (md.ExtensionSet .gitHubFlavored .blockSyntaxes);
150+ ..addAll (md.ExtensionSet .gitHubWeb .blockSyntaxes);
151151
152152// Remove these schemas from the display text for hyperlinks.
153153final RegExp _hide_schemes = new RegExp ('^(http|https)://' );
Original file line number Diff line number Diff line change @@ -23,9 +23,11 @@ Uri get _currentFileUri =>
2323
2424String get _testPackageDocsPath {
2525 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' ));
2728 } else {
28- return pathLib.fromUri (_currentFileUri.resolve ('../testing/test_package_docs' ));
29+ return pathLib
30+ .fromUri (_currentFileUri.resolve ('../testing/test_package_docs' ));
2931 }
3032}
3133
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ void main() {
250250
251251 test ('documentation can be rendered as HTML' , () {
252252 expect (packageGraph.defaultPackage.documentationAsHtml,
253- contains ('<h1>Best Package</h1>' ));
253+ contains ('<h1 id="best-package" >Best Package</h1>' ));
254254 });
255255
256256 test ('sdk name' , () {
Original file line number Diff line number Diff line change 11# Best Package
22
3+ * [ Examples] ( #examples )
4+ * [ Another Section] ( #another-section )
5+
36This is an amazing package.
47
8+
9+ ## Examples
10+
511For example, it:
612
713* Is very fast
@@ -56,6 +62,8 @@ var f = function(a, b) {
5662};
5763```
5864
65+ ## Another Section
66+
5967It sometimes generates warnings in commentRefs like this: [ unknownThingy.FromSomewhere]
6068
6169Be 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
6161 < h1 > fake library</ h1 >
6262
6363 < 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 >
6565< p > If you don't have this package yet, get it.
6666Don't ask questions.</ p >
6767< p > Testing code < code > true</ code > and < code > false</ code > </ p >
6868< p > Testing string escaping: < code > var s = 'I am a string'</ code > </ p >
6969< 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 >
7171< p > hello there</ p >
72- < h3 > I am an h3</ h3 >
72+ < h3 id =" i-am-an-h3 " > I am an h3</ h3 >
7373< p > hello there</ p >
74- < h4 > I am an h4</ h4 >
74+ < h4 id =" i-am-an-h4 " > I am an h4</ h4 >
7575< p > hello there</ p >
76- < h5 > I am an h5</ h5 >
76+ < h5 id =" i-am-an-h5 " > I am an h5</ h5 >
7777< p > hello</ p >
7878< 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 >
7979< 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
5656
5757 < div class ="col-xs-12 col-sm-9 col-md-8 main-content ">
5858 < 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 >
6060< p > This is an amazing package.</ p >
61+ < h2 id ="examples "> Examples</ h2 >
6162< p > For example, it:</ p > < ul > < li > Is very fast</ li > < li > Has zero bugs</ li > < li > Is free</ li > </ ul >
6263< p > It also has some awesome code</ p >
6364< pre class ="language-dart "> < code class ="language-dart "> void main() {
@@ -96,6 +97,7 @@ <h1>Best Package</h1>
9697 return a + b;
9798};
9899</ code > </ pre >
100+ < h2 id ="another-section "> Another Section</ h2 >
99101< p > It sometimes generates warnings in commentRefs like this: < code > unknownThingy.FromSomewhere</ code > </ p >
100102< p > Be sure to check out other awesome packages on < a href ="https://pub.dartlang.org "> pub</ a > .</ p >
101103 </ 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
6161 < h1 > fake library</ h1 >
6262
6363 < 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 >
6565< p > If you don't have this package yet, get it.
6666Don't ask questions.</ p >
6767< p > Testing code < code > true</ code > and < code > false</ code > </ p >
6868< p > Testing string escaping: < code > var s = 'I am a string'</ code > </ p >
6969< 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 >
7171< p > hello there</ p >
72- < h3 > I am an h3</ h3 >
72+ < h3 id =" i-am-an-h3 " > I am an h3</ h3 >
7373< p > hello there</ p >
74- < h4 > I am an h4</ h4 >
74+ < h4 id =" i-am-an-h4 " > I am an h4</ h4 >
7575< p > hello there</ p >
76- < h5 > I am an h5</ h5 >
76+ < h5 id =" i-am-an-h5 " > I am an h5</ h5 >
7777< p > hello</ p >
7878< 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 >
7979< 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
5656
5757 < div class ="col-xs-12 col-sm-9 col-md-8 main-content ">
5858 < 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 >
6060< p > This is an amazing package.</ p >
61+ < h2 id ="examples "> Examples</ h2 >
6162< p > For example, it:</ p > < ul > < li > Is very fast</ li > < li > Has zero bugs</ li > < li > Is free</ li > </ ul >
6263< p > It also has some awesome code</ p >
6364< pre class ="language-dart "> < code class ="language-dart "> void main() {
@@ -96,6 +97,7 @@ <h1>Best Package</h1>
9697 return a + b;
9798};
9899</ code > </ pre >
100+ < h2 id ="another-section "> Another Section</ h2 >
99101< p > It sometimes generates warnings in commentRefs like this: < code > unknownThingy.FromSomewhere</ code > </ p >
100102< p > Be sure to check out other awesome packages on < a href ="https://pub.dartlang.org "> pub</ a > .</ p >
101103 </ section >
Original file line number Diff line number Diff line change @@ -879,9 +879,11 @@ testDartdocFlutterPlugin() async {
879879@Task ('update test_package_docs' )
880880updateTestPackageDocs () async {
881881 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' ));
885887 var testPackage = new Directory (pathLib.join ('testing' , 'test_package' ));
886888 await launcher.runStreamed (sdkBin ('pub' ), ['get' ],
887889 workingDirectory: testPackage.path);
You can’t perform that action at this time.
0 commit comments