Skip to content

Commit e275125

Browse files
committed
Revert "Cache size of all lines except the last"
This reverts commit 09f6d44.
1 parent 09f6d44 commit e275125

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/utils.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ var utils = {
3434
},
3535

3636
calculateLineSize: function (line) {
37-
if (line.size) {
38-
return line.size;
39-
}
40-
4137
var size = { height: 1, width: 0 };
4238
line.forEach(function (outputEntry) {
4339
var outputEntrySize = utils.calculateOutputEntrySize(outputEntry);
@@ -50,13 +46,10 @@ var utils = {
5046

5147
calculateSize: function (lines) {
5248
var size = { height: 0, width: 0 };
53-
lines.forEach(function (line, index) {
49+
lines.forEach(function (line) {
5450
var lineSize = utils.calculateLineSize(line);
5551
size.height += lineSize.height;
5652
size.width = Math.max(size.width, lineSize.width);
57-
if (index < lines.length - 1) {
58-
line.size = lineSize;
59-
}
6053
});
6154
return size;
6255
},

0 commit comments

Comments
 (0)