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

Unified Diff: lib/src/treebuilder.dart

Issue 987433005: remove most string concat, fixes #7 (Closed) Base URL: git@github.com:dart-lang/html.git@master
Patch Set: Created 5 years, 10 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
« lib/src/tokenizer.dart ('K') | « lib/src/tokenizer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/treebuilder.dart
diff --git a/lib/src/treebuilder.dart b/lib/src/treebuilder.dart
index 0ed97407f0bbc57a7df3dd512143e1a2351b8942..409cba429a491a3a19e892617438c8db7281c8ee 100644
--- a/lib/src/treebuilder.dart
+++ b/lib/src/treebuilder.dart
@@ -324,7 +324,7 @@ class TreeBuilder {
if (refNode == null) {
if (nodes.length > 0 && nodes.last is Text) {
Text last = nodes.last;
- last.data = '${last.data}$data';
+ last.appendData(data);
if (span != null) {
last.sourceSpan =
@@ -337,7 +337,7 @@ class TreeBuilder {
int index = nodes.indexOf(refNode);
if (index > 0 && nodes[index - 1] is Text) {
Text last = nodes[index - 1];
- last.data = '${last.data}$data';
+ last.appendData(data);
} else {
nodes.insert(index, new Text(data)..sourceSpan = span);
}
« lib/src/tokenizer.dart ('K') | « lib/src/tokenizer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698