Skip to content

Commit 6f0ad21

Browse files
committed
fix lint issues
1 parent a36e884 commit 6f0ad21

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

lib/line_wrapper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ class LineWrapper extends EventEmitter {
246246
this.height != null &&
247247
this.ellipsis &&
248248
// If the current line and its following one cant fit, then render the ellipsis
249-
PDFNumber(this.document.y + lh + this.document.currentLineHeight(true)) > this.maxY &&
249+
PDFNumber(
250+
this.document.y + lh + this.document.currentLineHeight(true),
251+
) > this.maxY &&
250252
this.column >= this.columns
251253
) {
252254
if (this.ellipsis === true) {

tests/visual/table.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ describe('table', function () {
426426
});
427427
});
428428

429-
test('ignore trailing line break - issue #1620', function() {
430-
return runDocTest({systemFonts: true}, function(doc) {
429+
test('ignore trailing line break - issue #1620', function () {
430+
return runDocTest({ systemFonts: true }, function (doc) {
431431
doc.table({
432432
debug: true,
433433
data: [['trailingLineBreak\ndefault (true)']],

tests/visual/text.spec.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,25 @@ describe('text', function () {
183183
});
184184
});
185185

186-
test('ignore trailing line break - issue #1620', function() {
187-
return runDocTest({systemFonts: true}, function(doc) {
186+
test('ignore trailing line break - issue #1620', function () {
187+
return runDocTest({ systemFonts: true }, function (doc) {
188188
const text = 'test\ntest';
189-
let heightWithout = doc.heightOfString(text, {trailingLineBreak: false});
190-
doc.save().rect(doc.x, doc.y, doc.page.contentWidth, heightWithout).strokeColor("red", 0.3).stroke().restore();
189+
let heightWithout = doc.heightOfString(text, {
190+
trailingLineBreak: false,
191+
});
192+
doc
193+
.save()
194+
.rect(doc.x, doc.y, doc.page.contentWidth, heightWithout)
195+
.strokeColor('red', 0.3)
196+
.stroke()
197+
.restore();
191198
let height = doc.heightOfString(text);
192-
doc.save().rect(doc.x, doc.y, doc.page.contentWidth, height).strokeColor("blue", 0.3).stroke().restore();
199+
doc
200+
.save()
201+
.rect(doc.x, doc.y, doc.page.contentWidth, height)
202+
.strokeColor('blue', 0.3)
203+
.stroke()
204+
.restore();
193205
doc.text(text, { height });
194206
});
195207
});

0 commit comments

Comments
 (0)