Fix errors reported by the keyword-spacing
ESLint rule
http://eslint.org/docs/rules/keyword-spacing
This commit is contained in:
parent
86ba634c97
commit
c36468cbce
@ -568,7 +568,7 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
|||||||
if (this.pdfNetworkStream) {
|
if (this.pdfNetworkStream) {
|
||||||
this.pdfNetworkStream.cancelAllRequests('abort');
|
this.pdfNetworkStream.cancelAllRequests('abort');
|
||||||
}
|
}
|
||||||
for(var requestId in this.promisesByRequest) {
|
for (var requestId in this.promisesByRequest) {
|
||||||
var capability = this.promisesByRequest[requestId];
|
var capability = this.promisesByRequest[requestId];
|
||||||
capability.reject(new Error('Request was aborted'));
|
capability.reject(new Error('Request was aborted'));
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
|||||||
result = value;
|
result = value;
|
||||||
}
|
}
|
||||||
resolve(result);
|
resolve(result);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
if (!(e instanceof MissingDataException)) {
|
if (!(e instanceof MissingDataException)) {
|
||||||
reject(e);
|
reject(e);
|
||||||
return;
|
return;
|
||||||
|
@ -550,7 +550,7 @@ var Type1Parser = (function Type1ParserClosure() {
|
|||||||
this.getToken(); // read in 'dict'
|
this.getToken(); // read in 'dict'
|
||||||
this.getToken(); // read in 'dup'
|
this.getToken(); // read in 'dup'
|
||||||
this.getToken(); // read in 'begin'
|
this.getToken(); // read in 'begin'
|
||||||
while(true) {
|
while (true) {
|
||||||
token = this.getToken();
|
token = this.getToken();
|
||||||
if (token === null || token === 'end') {
|
if (token === null || token === 'end') {
|
||||||
break;
|
break;
|
||||||
|
@ -374,7 +374,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
var j = horizon.length - 1;
|
var j = horizon.length - 1;
|
||||||
while(j >= 0 && horizon[j].start >= boundary.y2) {
|
while (j >= 0 && horizon[j].start >= boundary.y2) {
|
||||||
j--;
|
j--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1766,7 +1766,7 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {
|
|||||||
u.pathname = 'c%20d';
|
u.pathname = 'c%20d';
|
||||||
hasWorkingUrl = u.href === 'http://a/c%20d';
|
hasWorkingUrl = u.href === 'http://a/c%20d';
|
||||||
}
|
}
|
||||||
} catch(e) { }
|
} catch (e) { }
|
||||||
|
|
||||||
if (hasWorkingUrl) {
|
if (hasWorkingUrl) {
|
||||||
return;
|
return;
|
||||||
|
@ -179,14 +179,14 @@ function main() {
|
|||||||
try {
|
try {
|
||||||
var baselineFile = fs.readFileSync(options.baseline).toString();
|
var baselineFile = fs.readFileSync(options.baseline).toString();
|
||||||
baseline = flatten(JSON.parse(baselineFile));
|
baseline = flatten(JSON.parse(baselineFile));
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
console.log('Error reading file "' + options.baseline + '": ' + e);
|
console.log('Error reading file "' + options.baseline + '": ' + e);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
var currentFile = fs.readFileSync(options.current).toString();
|
var currentFile = fs.readFileSync(options.current).toString();
|
||||||
current = flatten(JSON.parse(currentFile));
|
current = flatten(JSON.parse(currentFile));
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
console.log('Error reading file "' + options.current + '": ' + e);
|
console.log('Error reading file "' + options.current + '": ' + e);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ function getPDFFileNameFromURL(url) {
|
|||||||
try {
|
try {
|
||||||
suggestedFilename =
|
suggestedFilename =
|
||||||
reFilename.exec(decodeURIComponent(suggestedFilename))[0];
|
reFilename.exec(decodeURIComponent(suggestedFilename))[0];
|
||||||
} catch(e) { // Possible (extremely rare) errors:
|
} catch (e) { // Possible (extremely rare) errors:
|
||||||
// URIError "Malformed URI", e.g. for "%AA.pdf"
|
// URIError "Malformed URI", e.g. for "%AA.pdf"
|
||||||
// TypeError "null has no properties", e.g. for "%2F.pdf"
|
// TypeError "null has no properties", e.g. for "%2F.pdf"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user