Skip to content

Commit 5770082

Browse files
committed
Update pkg:markdown to v2
1 parent 2e35497 commit 5770082

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.19.1
2+
* Update `package:markdown` to `2.0.0`, which includes many improvements –
3+
especially to the parsing of links.
4+
15
## 0.19.0
26
* Build documentation through the Package object (#1659)
37
* New flag, --link-to-remote, which will cause Dartdoc to link symbols to their originating

lib/dartdoc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export 'package:dartdoc/src/package_meta.dart';
3737

3838
const String name = 'dartdoc';
3939
// Update when pubspec version changes.
40-
const String dartdocVersion = '0.19.0';
40+
const String dartdocVersion = '0.19.1-dev';
4141

4242
/// Generates Dart documentation for all public Dart libraries in the given
4343
/// directory.

lib/src/markdown_processor.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ class MarkdownDocument extends md.Document {
814814
{Iterable<md.BlockSyntax> blockSyntaxes,
815815
Iterable<md.InlineSyntax> inlineSyntaxes,
816816
md.ExtensionSet extensionSet,
817-
linkResolver,
817+
md.Resolver linkResolver,
818818
imageLinkResolver})
819819
: super(
820820
blockSyntaxes: blockSyntaxes,
@@ -971,7 +971,10 @@ class Documentation {
971971
/// Returns a tuple of longHtml, shortHtml, hasExtendedDocs
972972
/// (longHtml is NULL if !processFullDocs)
973973
Tuple3<String, String, bool> _renderMarkdownToHtml(bool processFullDocs) {
974-
md.Node _linkResolver(String name) {
974+
md.Node _linkResolver(String name, [String _]) {
975+
if (name.isEmpty) {
976+
return null;
977+
}
975978
return new md.Text(_linkDocReference(name, _element, commentRefs));
976979
}
977980

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ packages:
168168
name: markdown
169169
url: "https://pub.dartlang.org"
170170
source: hosted
171-
version: "1.1.1"
171+
version: "2.0.0"
172172
matcher:
173173
dependency: transitive
174174
description:
@@ -401,4 +401,4 @@ packages:
401401
source: hosted
402402
version: "2.1.13"
403403
sdks:
404-
dart: ">=2.0.0-dev.23.0 <=2.0.0-dev.53.0"
404+
dart: ">=2.0.0-dev.23.0 <=2.0.0-dev.54.0"

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dartdoc
22
# Also update the `version` field in lib/dartdoc.dart.
3-
version: 0.19.0
3+
version: 0.19.1-dev
44
author: Dart Team <[email protected]>
55
description: A documentation generator for Dart.
66
homepage: https://github.com/dart-lang/dartdoc
@@ -18,7 +18,7 @@ dependencies:
1818
# least version 3.0.3 to work around an issue with 3.0.2.
1919
http_parser: '>=3.0.3 <4.0.0'
2020
logging: ^0.11.3+1
21-
markdown: ^1.0.0
21+
markdown: ^2.0.0
2222
mustache4dart: ^2.1.1
2323
package_config: '>=0.1.5 <2.0.0'
2424
path: ^1.3.0

testing/test_package_docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<meta name="generator" content="made with love by dartdoc 0.19.0">
7+
<meta name="generator" content="made with love by dartdoc 0.19.1-dev">
88
<meta name="description" content="test_package API docs, for the Dart programming language.">
99
<title>test_package - Dart API docs</title>
1010

0 commit comments

Comments
 (0)