mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Update Prettier to version 2.0
Please note that these changes were done automatically, using `gulp lint --fix`. Given that the major version number was increased, there's a fair number of (primarily whitespace) changes; please see https://prettier.io/blog/2020/03/21/2.0.0.html In order to reduce the size of these changes somewhat, this patch maintains the old "arrowParens" style for now (once mozilla-central updates Prettier we can simply choose the same formatting, assuming it will differ here).
This commit is contained in:
parent
a4dd081d7b
commit
426945b480
145 changed files with 2005 additions and 2009 deletions
|
@ -282,7 +282,7 @@ class Page {
|
|||
resources: this.resources,
|
||||
operatorList: opList,
|
||||
})
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return opList;
|
||||
});
|
||||
});
|
||||
|
@ -290,7 +290,7 @@ class Page {
|
|||
// Fetch the page's annotations and add their operator lists to the
|
||||
// page's operator list to render them.
|
||||
return Promise.all([pageListPromise, this._parsedAnnotations]).then(
|
||||
function([pageOpList, annotations]) {
|
||||
function ([pageOpList, annotations]) {
|
||||
if (annotations.length === 0) {
|
||||
pageOpList.flush(true);
|
||||
return { length: pageOpList.totalLength };
|
||||
|
@ -311,7 +311,7 @@ class Page {
|
|||
}
|
||||
}
|
||||
|
||||
return Promise.all(opListPromises).then(function(opLists) {
|
||||
return Promise.all(opListPromises).then(function (opLists) {
|
||||
pageOpList.addOp(OPS.beginAnnotations, []);
|
||||
for (const opList of opLists) {
|
||||
pageOpList.addOpList(opList);
|
||||
|
@ -366,7 +366,7 @@ class Page {
|
|||
}
|
||||
|
||||
getAnnotationsData(intent) {
|
||||
return this._parsedAnnotations.then(function(annotations) {
|
||||
return this._parsedAnnotations.then(function (annotations) {
|
||||
const annotationsData = [];
|
||||
for (let i = 0, ii = annotations.length; i < ii; i++) {
|
||||
if (!intent || isAnnotationRenderable(annotations[i], intent)) {
|
||||
|
@ -403,12 +403,12 @@ class Page {
|
|||
}
|
||||
|
||||
return Promise.all(annotationPromises).then(
|
||||
function(annotations) {
|
||||
function (annotations) {
|
||||
return annotations.filter(function isDefined(annotation) {
|
||||
return !!annotation;
|
||||
});
|
||||
},
|
||||
function(reason) {
|
||||
function (reason) {
|
||||
warn(`_parsedAnnotations: "${reason}".`);
|
||||
return [];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue