mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
Update to the latest markdown, an internal Cl has been prepared and
paired with this so the sdk roll can succeed. TEST=Fixes static errors Change-Id: Ia4e325936ea81d0d51fbf6dd939b732860d22100 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183760 Commit-Queue: Jake Macdonald <jakemac@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
This commit is contained in:
parent
40ed649ef6
commit
88fdbea483
|
@ -404,7 +404,7 @@
|
|||
"name": "markdown",
|
||||
"rootUri": "../third_party/pkg/markdown",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.6"
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "matcher",
|
||||
|
@ -782,4 +782,4 @@
|
|||
"languageVersion": "2.12"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
2
DEPS
2
DEPS
|
@ -121,7 +121,7 @@ vars = {
|
|||
"linter_tag": "0.1.129",
|
||||
"logging_rev": "e2f633b543ef89c54688554b15ca3d7e425b86a2",
|
||||
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
|
||||
"markdown_rev": "6f89681d59541ddb1cf3a58efbdaa2304ffc3f51",
|
||||
"markdown_rev": "9c4beaac96d8f008078e00b027915f81b665d2de",
|
||||
"matcher_rev": "43d5cac48fcd386643016e767164da87c5c25e29",
|
||||
"mime_rev": "c931f4bed87221beaece356494b43731445ce7b8",
|
||||
"mockito_rev": "d39ac507483b9891165e422ec98d9fb480037c8b",
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
library generate_vm_service_common;
|
||||
|
||||
// TODO(bkonyi): remove once markdown and pub_semver deps are updated to null
|
||||
// safety for the SDK.
|
||||
// ignore_for_file: import_of_legacy_library_into_null_safe
|
||||
import 'package:markdown/markdown.dart';
|
||||
import 'package:pub_semver/pub_semver.dart';
|
||||
|
||||
|
@ -23,7 +20,7 @@ class ApiParseUtil {
|
|||
|
||||
// Extract version from header: `# Dart VM Service Protocol 2.0`.
|
||||
Element node = nodes.firstWhere((n) => isH1(n)) as Element;
|
||||
Text text = node.children[0] as Text;
|
||||
Text text = node.children![0] as Text;
|
||||
Match? match = regex.firstMatch(text.text);
|
||||
if (match == null) throw 'Unable to locate service protocol version';
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
library src_gen_common;
|
||||
|
||||
// TODO(bkonyi): remove once markdown and pub_semver deps are updated to null
|
||||
// safety for the SDK.
|
||||
// ignore_for_file: import_of_legacy_library_into_null_safe
|
||||
import 'package:markdown/markdown.dart';
|
||||
|
||||
const int RUNE_SPACE = 32;
|
||||
|
@ -27,9 +24,9 @@ bool isH1(Node node) => node is Element && node.tag == 'h1';
|
|||
bool isH3(Node node) => node is Element && node.tag == 'h3';
|
||||
bool isHeader(Node node) => node is Element && node.tag.startsWith('h');
|
||||
String textForElement(Node node) =>
|
||||
(((node as Element).children.first) as Text).text;
|
||||
(((node as Element).children!.first) as Text).text;
|
||||
String textForCode(Node node) =>
|
||||
textForElement((node as Element).children.first);
|
||||
textForElement((node as Element).children!.first);
|
||||
|
||||
/// foo ==> Foo
|
||||
String titleCase(String str) =>
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
library generate_vm_service_dart;
|
||||
|
||||
// TODO(bkonyi): remove once markdown and pub_semver deps are updated to null
|
||||
// safety for the SDK.
|
||||
// ignore_for_file: import_of_legacy_library_into_null_safe
|
||||
import 'package:markdown/markdown.dart';
|
||||
|
||||
import '../common/generate_common.dart';
|
||||
|
@ -497,7 +494,7 @@ class Api extends Member with ApiParseUtil {
|
|||
return n.text;
|
||||
} else if (n is Element) {
|
||||
if (n.tag != 'h3') return n.tag;
|
||||
return '${n.tag}:[${n.children.map((c) => printNode(c)).join(', ')}]';
|
||||
return '${n.tag}:[${n.children!.map((c) => printNode(c)).join(', ')}]';
|
||||
} else {
|
||||
return '${n}';
|
||||
}
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
import 'dart:io';
|
||||
|
||||
// TODO(bkonyi): remove once markdown and pub_semver deps are updated to null
|
||||
// safety for the SDK.
|
||||
// ignore_for_file: import_of_legacy_library_into_null_safe
|
||||
import 'package:markdown/markdown.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:pub_semver/pub_semver.dart';
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
library generate_vm_service_java;
|
||||
|
||||
// TODO(bkonyi): remove once markdown and pub_semver deps are updated to null
|
||||
// safety for the SDK.
|
||||
// ignore_for_file: import_of_legacy_library_into_null_safe
|
||||
import 'package:markdown/markdown.dart';
|
||||
import 'package:pub_semver/pub_semver.dart';
|
||||
|
||||
|
@ -280,7 +277,7 @@ class Api extends Member with ApiParseUtil {
|
|||
} else if (isHeader(node)) {
|
||||
h3Name = null;
|
||||
} else if (isPara(node)) {
|
||||
var children = (node as Element).children;
|
||||
var children = (node as Element).children!;
|
||||
if (children.isNotEmpty && children.first is Text) {
|
||||
var text = children.expand<String>((child) {
|
||||
if (child is Text) return [child.text];
|
||||
|
@ -356,7 +353,7 @@ class Api extends Member with ApiParseUtil {
|
|||
return n.text;
|
||||
} else if (n is Element) {
|
||||
if (n.tag != 'h3') return n.tag;
|
||||
return '${n.tag}:[${n.children.map((c) => printNode(c)).join(', ')}]';
|
||||
return '${n.tag}:[${n.children!.map((c) => printNode(c)).join(', ')}]';
|
||||
} else {
|
||||
return '${n}';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue