Fix regular expression for google docs parsing

This commit is contained in:
Calvin Montgomery 2014-08-07 23:19:07 -07:00
parent f11be6ae81
commit 4f7ec228d3
1 changed files with 5 additions and 1 deletions

View File

@ -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 = {};