1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Add // prettier-ignore comments to prevent re-formatting of certain data structures

There's a fair number of (primarily) `Array`s/`TypedArray`s whose formatting we don't want disturb, since in many cases that would lead to the code becoming much more difficult to read and/or break existing inline comments.

*Please note:* It may be a good idea to look through these cases individually, and possibly re-write some of the them (especially the `String` ones) to reduce the need for all of these ignore commands.
This commit is contained in:
Jonas Jenwald 2019-12-25 15:54:34 +01:00
parent c3a1c67950
commit 8ec1dfde49
25 changed files with 130 additions and 3 deletions

View file

@ -41,6 +41,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
const twoDimVertR3 = 7;
const twoDimVertL3 = 8;
// prettier-ignore
const twoDimTable = [
[-1, -1], [-1, -1], // 000000x
[7, twoDimVertL3], // 0000010
@ -109,6 +110,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
[1, twoDimVert0], [1, twoDimVert0]
];
// prettier-ignore
const whiteTable1 = [
[-1, -1], // 00000
[12, ccittEOL], // 00001
@ -131,6 +133,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
[12, 2560] // 11111
];
// prettier-ignore
const whiteTable2 = [
[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000000xx
[8, 29], [8, 29], // 00000010x
@ -295,6 +298,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
[4, 7], [4, 7], [4, 7], [4, 7]
];
// prettier-ignore
const blackTable1 = [
[-1, -1], [-1, -1], // 000000000000x
[12, ccittEOL], [12, ccittEOL], // 000000000001x
@ -356,6 +360,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
[10, 64], [10, 64], [10, 64], [10, 64]
];
// prettier-ignore
const blackTable2 = [
[8, 13], [8, 13], [8, 13], [8, 13], // 00000100xxxx
[8, 13], [8, 13], [8, 13], [8, 13],
@ -435,6 +440,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
[7, 12], [7, 12], [7, 12], [7, 12]
];
// prettier-ignore
const blackTable3 = [
[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000xx
[6, 9], // 000100