commit 695dd4e65db1c6df5a9b3ab15c7ba2be4611b163 parent 9a8ab522e15d8304d3f5e79bc7da5d4326019510 Author: Dan Stillman <dstillman@zotero.org> Date: Mon, 24 Jul 2017 22:49:17 -0400 Don't omit first line in debug output when submitting Diffstat:
| M | chrome/content/zotero/xpcom/debug.js | | | 8 | +++----- |
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/debug.js b/chrome/content/zotero/xpcom/debug.js @@ -198,11 +198,9 @@ Zotero.Debug = new function () { if (maxChars) { output = output.substr(maxChars * -1); // Cut at two newlines - for (var i=1, len=output.length; i<len; i++) { - if (output[i] == '\n' && output[i-1] == '\n') { - output = output.substr(i + 1); - break; - } + let matches = output.match(/^[\n]*\n\n/); + if (matches) { + output = output.substr(matches[0].length); } }