From 4f7ec228d3a57a42abd8f34fe790964b666a2505 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Thu, 7 Aug 2014 23:19:07 -0700 Subject: [PATCH] Fix regular expression for google docs parsing --- lib/get-info.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/get-info.js b/lib/get-info.js index 82a6e1e1..f1acffa6 100644 --- a/lib/get-info.js +++ b/lib/get-info.js @@ -703,7 +703,11 @@ var Getters = { return callback("HTTP " + status, null); } - var m = res.match(/(\[\s*\[[^\[].*?\]\s*\])/); + /* + * Match [[anything]] and ignore whitespace + * Fix 2014-08-07: [^] matches \r\n, . doesn't. + */ + var m = res.match(/(\[\s*\[[^\[][^]*?\]\s*\])/); try { var propertyList = JSON.parse(m[1]); var data = {};