()
| 46 | const isFenceLine = FENCE.test(line); |
| 47 | const willBeOpen = isFenceLine ? !fenceOpen : fenceOpen; |
| 48 | const room = () => maxLen - (willBeOpen ? CLOSE.length : 0) - disp.length; |
| 49 | |
| 50 | while (line.length > room()) { |
| 51 | if (!isFresh()) { cut(); continue; } // flush current piece, retry on a clean one |