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

Unified Diff: utils/apidoc/mdn/extract.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: utils/apidoc/mdn/extract.dart
diff --git a/utils/apidoc/mdn/extract.dart b/utils/apidoc/mdn/extract.dart
index da3a7f3162dabb4016047cc7a0b53e2853bbf93a..65d753b8c2068dd6c56c53869006d15e6ad8d436 100644
--- a/utils/apidoc/mdn/extract.dart
+++ b/utils/apidoc/mdn/extract.dart
@@ -611,7 +611,7 @@ SectionParseResult filteredHtml(Element elem, Element root, String prop,
if (prop != null && prop.length > 0) {
// Only expect properties to have HTML.
for(Element e in fragment.queryAll(IDL_SELECTOR)) {
- idl.add(e.outerHTML);
+ idl.write(e.outerHTML);
e.remove();
}
// TODO(jacobr) this is a very basic regex to see if text looks like IDL
@@ -621,7 +621,7 @@ SectionParseResult filteredHtml(Element elem, Element root, String prop,
// Check if it looks like idl...
String txt = e.text.trim();
if (likelyIdl.hasMatch(txt) && txt.contains("\n") && txt.contains(")")) {
- idl.add(e.outerHTML);
+ idl.write(e.outerHTML);
e.remove();
}
}
@@ -1273,7 +1273,7 @@ void run() {
// safe to include in the summary.
StringBuffer summary = new StringBuffer();
for (Element e in root.queryAll("#Summary, #Description")) {
- summary.add(filteredHtml(root, e, null, removeHeaders).html);
+ summary.write(filteredHtml(root, e, null, removeHeaders).html);
}
if (summary.length == 0) {
@@ -1288,7 +1288,7 @@ void run() {
}
}
// Risky... this might add stuff we shouldn't.
- summary.add(filteredHtml(root, root, null, removeHeaders).html);
+ summary.write(filteredHtml(root, root, null, removeHeaders).html);
}
if (summary.length > 0) {

Powered by Google App Engine
This is Rietveld 408576698