1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08: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:
Jonas Jenwald 2020-04-14 12:28:14 +02:00
parent a4dd081d7b
commit 426945b480
145 changed files with 2005 additions and 2009 deletions

View file

@ -283,7 +283,7 @@ var Glyph = (function GlyphClosure() {
this.isInFont = isInFont;
}
Glyph.prototype.matchesForCache = function(
Glyph.prototype.matchesForCache = function (
fontChar,
unicode,
accent,
@ -694,7 +694,7 @@ var Font = (function FontClosure() {
this.seacMap = properties.seacMap;
}
Font.getFontID = (function() {
Font.getFontID = (function () {
var ID = 1;
return function Font_getFontID() {
return String(ID++);
@ -1367,7 +1367,7 @@ var Font = (function FontClosure() {
var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap;
if (!isIdentityUnicode) {
this.toUnicode.forEach(function(charCode, unicodeCharCode) {
this.toUnicode.forEach(function (charCode, unicodeCharCode) {
map[+charCode] = unicodeCharCode;
});
}
@ -1775,7 +1775,7 @@ var Font = (function FontClosure() {
}
// removing duplicate entries
mappings.sort(function(a, b) {
mappings.sort(function (a, b) {
return a.charCode - b.charCode;
});
for (i = 1; i < mappings.length; i++) {
@ -2764,7 +2764,7 @@ var Font = (function FontClosure() {
var cidToGidMap = properties.cidToGidMap || [];
var isCidToGidMapEmpty = cidToGidMap.length === 0;
properties.cMap.forEach(function(charCode, cid) {
properties.cMap.forEach(function (charCode, cid) {
if (cid > 0xffff) {
throw new FormatError("Max size of CID is 65,535");
}