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

Unified Diff: base/string_util.cc

Issue 3250002: Add an accordian effect to NTP. (Closed)
Patch Set: Fix menu positioning when there is a scrollbar. Created 10 years, 4 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 | « no previous file | chrome/app/generated_resources.grd » ('j') | chrome/browser/resources/new_new_tab.css » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.cc
diff --git a/base/string_util.cc b/base/string_util.cc
index 4dbcd7b0c3bbd87d283791b43c8278d638d810f1..56aa39de6d3fdf2cb1bbf592303925a7f5046bf0 100644
--- a/base/string_util.cc
+++ b/base/string_util.cc
@@ -1013,7 +1013,11 @@ OutStringType DoReplaceStringPlaceholders(const FormatStringType& format_string,
++i;
DCHECK('$' == *i || '1' <= *i) << "Invalid placeholder: " << *i;
if ('$' == *i) {
- formatted.push_back('$');
+ while (i != format_string.end() && '$' == *i) {
Miranda Callahan 2010/08/30 21:17:15 nice. :-)
+ formatted.push_back('$');
+ ++i;
+ }
+ --i;
} else {
uintptr_t index = *i - '1';
if (offsets) {
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | chrome/browser/resources/new_new_tab.css » ('J')

Powered by Google App Engine
This is Rietveld 408576698