(tableOptions)
| 73 | } |
| 74 | |
| 75 | computeLines(tableOptions) { |
| 76 | const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap; |
| 77 | const { wordWrap = tableWordWrap } = this.options; |
| 78 | if (this.fixedWidth && wordWrap) { |
| 79 | this.fixedWidth -= this.paddingLeft + this.paddingRight; |
| 80 | if (this.colSpan) { |
| 81 | let i = 1; |
| 82 | while (i < this.colSpan) { |
| 83 | this.fixedWidth += tableOptions.colWidths[this.x + i]; |
| 84 | i++; |
| 85 | } |
| 86 | } |
| 87 | const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions; |
| 88 | const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options; |
| 89 | return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary)); |
| 90 | } |
| 91 | return this.wrapLines(this.content.split('\n')); |
| 92 | } |
| 93 | |
| 94 | wrapLines(computedLines) { |
| 95 | const lines = utils.colorizeLines(computedLines); |
no test coverage detected