Be more lenient about spacing
This commit is contained in:
parent
c3ad5fd6f9
commit
448d68295b
|
@ -55,7 +55,7 @@ Zotero_TranslatorTester = function(translator, type, debug) {
|
||||||
var testEnd = code.indexOf("/** END TEST CASES **/");
|
var testEnd = code.indexOf("/** END TEST CASES **/");
|
||||||
if (testStart !== -1 && testEnd !== -1) {
|
if (testStart !== -1 && testEnd !== -1) {
|
||||||
var test = code.substring(testStart + 24, testEnd);
|
var test = code.substring(testStart + 24, testEnd);
|
||||||
test = test.replace(/var testCases = /,'');
|
test = test.replace(/var testCases = /,'').trim();
|
||||||
// The JSON parser doesn't like final semicolons
|
// The JSON parser doesn't like final semicolons
|
||||||
if (test.lastIndexOf(';') == (test.length-1)) {
|
if (test.lastIndexOf(';') == (test.length-1)) {
|
||||||
test = test.slice(0,-1);
|
test = test.slice(0,-1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user