From 0f61fca93f917abd9a804648ddea4f52ff846ebc Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Sat, 31 May 2014 14:17:21 -0700 Subject: [PATCH] browser: don't let "%%" throw off the color insertion index --- browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser.js b/browser.js index 1ab3ab8..67ed0b0 100644 --- a/browser.js +++ b/browser.js @@ -85,12 +85,12 @@ function log() { // figure out the correct index to insert the CSS into var index = 0; args[0].replace(/%[a-z%]/g, function(match) { + if ('%%' === match) return; index++; if (index < 3) return; // skip the first 2 %c's since that's handled already if ('%c' === match) { args.splice(index, 0, c); } - return match; }); }