Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Unified Diff: pkg/dartdoc/lib/src/markdown/inline_parser.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/dartdoc/lib/src/markdown/block_parser.dart ('k') | pkg/intl/lib/src/date_format_field.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/src/markdown/inline_parser.dart
diff --git a/pkg/dartdoc/lib/src/markdown/inline_parser.dart b/pkg/dartdoc/lib/src/markdown/inline_parser.dart
index eb941a73688071c07498a08ba04e39eb63de8506..348902eb1c6c92c92d0860ef53f9e3afdf733aa2 100644
--- a/pkg/dartdoc/lib/src/markdown/inline_parser.dart
+++ b/pkg/dartdoc/lib/src/markdown/inline_parser.dart
@@ -115,11 +115,11 @@ class InlineParser {
writeTextRange(int start, int end) {
if (end > start) {
final text = source.substring(start, end);
- final nodes = _stack.last().children;
+ final nodes = _stack.last.children;
// If the previous node is text too, just append.
- if ((nodes.length > 0) && (nodes.last() is Text)) {
- final newNode = new Text('${nodes.last().text}$text');
+ if ((nodes.length > 0) && (nodes.last is Text)) {
+ final newNode = new Text('${nodes.last.text}$text');
nodes[nodes.length - 1] = newNode;
} else {
nodes.add(new Text(text));
@@ -128,7 +128,7 @@ class InlineParser {
}
addNode(Node node) {
- _stack.last().children.add(node);
+ _stack.last.children.add(node);
}
// TODO(rnystrom): Only need this because RegExp doesn't let you start
« no previous file with comments | « pkg/dartdoc/lib/src/markdown/block_parser.dart ('k') | pkg/intl/lib/src/date_format_field.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698