From ce225eee8c9bfef527582e5d2f7069c0fe0391b2 Mon Sep 17 00:00:00 2001 From: Greg Bayer Date: Wed, 17 Aug 2011 14:36:19 -0700 Subject: [PATCH] Set debugging option flag before all dbg() calls. --- lib/readability.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/readability.js b/lib/readability.js index c8b5a52..9f27e75 100644 --- a/lib/readability.js +++ b/lib/readability.js @@ -2226,6 +2226,9 @@ exports.parse = function parse(theHtml, url, options, callback) { }; options = Utils.extend({}, defaultOptions, options); + // Debugging flag must be set before all dbg statements + readability.debugging = options.debug; + var startTime = new Date().getTime(); //dbg(html); var html = theHtml.replace(/]*>([\s\S]*?)<\/script>/gi, '');