We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09f6d44 commit e275125Copy full SHA for e275125
lib/utils.js
@@ -34,10 +34,6 @@ var utils = {
34
},
35
36
calculateLineSize: function (line) {
37
- if (line.size) {
38
- return line.size;
39
- }
40
-
41
var size = { height: 1, width: 0 };
42
line.forEach(function (outputEntry) {
43
var outputEntrySize = utils.calculateOutputEntrySize(outputEntry);
@@ -50,13 +46,10 @@ var utils = {
50
46
51
47
calculateSize: function (lines) {
52
48
var size = { height: 0, width: 0 };
53
- lines.forEach(function (line, index) {
49
+ lines.forEach(function (line) {
54
var lineSize = utils.calculateLineSize(line);
55
size.height += lineSize.height;
56
size.width = Math.max(size.width, lineSize.width);
57
- if (index < lines.length - 1) {
58
- line.size = lineSize;
59
60
});
61
return size;
62
0 commit comments