Fix errors reported by the space-infix-ops
ESLint rule
http://eslint.org/docs/rules/space-infix-ops
This commit is contained in:
parent
68bf47d55d
commit
28e50cfa21
@ -54,7 +54,7 @@ function isPdfDownloadable(details) {
|
|||||||
* @return {undefined|{name: string, value: string}} The header, if found.
|
* @return {undefined|{name: string, value: string}} The header, if found.
|
||||||
*/
|
*/
|
||||||
function getHeaderFromHeaders(headers, headerName) {
|
function getHeaderFromHeaders(headers, headerName) {
|
||||||
for (var i=0; i<headers.length; ++i) {
|
for (var i = 0; i < headers.length; ++i) {
|
||||||
var header = headers[i];
|
var header = headers[i];
|
||||||
if (header.name.toLowerCase() === headerName) {
|
if (header.name.toLowerCase() === headerName) {
|
||||||
return header;
|
return header;
|
||||||
|
2
external/builder/preprocessor2.js
vendored
2
external/builder/preprocessor2.js
vendored
@ -68,7 +68,7 @@ function handlePreprocessorAction(ctx, actionName, args, loc) {
|
|||||||
jsonPath.substring(ROOT_PREFIX.length));
|
jsonPath.substring(ROOT_PREFIX.length));
|
||||||
}
|
}
|
||||||
var jsonContent = fs.readFileSync(jsonPath).toString();
|
var jsonContent = fs.readFileSync(jsonPath).toString();
|
||||||
var parsedJSON = esprima.parse('(' +jsonContent + ')');
|
var parsedJSON = esprima.parse('(' + jsonContent + ')');
|
||||||
parsedJSON.body[0].expression.loc = loc;
|
parsedJSON.body[0].expression.loc = loc;
|
||||||
return parsedJSON.body[0].expression;
|
return parsedJSON.body[0].expression;
|
||||||
}
|
}
|
||||||
|
@ -895,7 +895,7 @@ var Lexer = (function LexerClosure() {
|
|||||||
var x2 = toHexDigit(ch);
|
var x2 = toHexDigit(ch);
|
||||||
if (x2 === -1) {
|
if (x2 === -1) {
|
||||||
warn('Lexer_getName: Illegal digit (' +
|
warn('Lexer_getName: Illegal digit (' +
|
||||||
String.fromCharCode(ch) +') in hexadecimal number.');
|
String.fromCharCode(ch) + ') in hexadecimal number.');
|
||||||
strBuf.push('#', String.fromCharCode(previousCh));
|
strBuf.push('#', String.fromCharCode(previousCh));
|
||||||
if (specialChars[ch]) {
|
if (specialChars[ch]) {
|
||||||
break;
|
break;
|
||||||
|
@ -1925,7 +1925,7 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'relative or authority':
|
case 'relative or authority':
|
||||||
if ('/' === c && '/' === input[cursor+1]) {
|
if ('/' === c && '/' === input[cursor + 1]) {
|
||||||
state = 'authority ignore slashes';
|
state = 'authority ignore slashes';
|
||||||
} else {
|
} else {
|
||||||
err('Expected /, got: ' + c);
|
err('Expected /, got: ' + c);
|
||||||
@ -1970,8 +1970,8 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {
|
|||||||
this._password = base._password;
|
this._password = base._password;
|
||||||
state = 'fragment';
|
state = 'fragment';
|
||||||
} else {
|
} else {
|
||||||
var nextC = input[cursor+1];
|
var nextC = input[cursor + 1];
|
||||||
var nextNextC = input[cursor+2];
|
var nextNextC = input[cursor + 2];
|
||||||
if ('file' !== this._scheme || !ALPHA.test(c) ||
|
if ('file' !== this._scheme || !ALPHA.test(c) ||
|
||||||
(nextC !== ':' && nextC !== '|') ||
|
(nextC !== ':' && nextC !== '|') ||
|
||||||
(EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC &&
|
(EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC &&
|
||||||
|
@ -159,7 +159,7 @@ function stat(baseline, current) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add horizontal line
|
// add horizontal line
|
||||||
var hline = width.map(function(w) { return new Array(w+1).join('-'); });
|
var hline = width.map(function(w) { return new Array(w + 1).join('-'); });
|
||||||
rows.splice(1, 0, hline);
|
rows.splice(1, 0, hline);
|
||||||
|
|
||||||
// print output
|
// print output
|
||||||
|
@ -70,7 +70,7 @@ describe('Type1Parser', function() {
|
|||||||
var stream = new StringStream(
|
var stream = new StringStream(
|
||||||
'/ExpansionFactor 99\n' +
|
'/ExpansionFactor 99\n' +
|
||||||
'/Subrs 1 array\n' +
|
'/Subrs 1 array\n' +
|
||||||
'dup 0 1 RD x noaccess put\n'+
|
'dup 0 1 RD x noaccess put\n' +
|
||||||
'end\n' +
|
'end\n' +
|
||||||
'/CharStrings 46 dict dup begin\n' +
|
'/CharStrings 46 dict dup begin\n' +
|
||||||
'/.notdef 1 RD x ND\n' +
|
'/.notdef 1 RD x ND\n' +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user