({ leading, subs })
| 128 | } |
| 129 | |
| 130 | function rebuildBody({ leading, subs }) { |
| 131 | const parts = []; |
| 132 | if (leading.length) parts.push(leading.join('\n')); |
| 133 | for (const s of subs) { |
| 134 | parts.push([s.headerLine, ...s.body].join('\n')); |
| 135 | } |
| 136 | return parts.join('\n').split('\n'); |
| 137 | } |
| 138 | |
| 139 | /** |
| 140 | * Return true when the block has any meaningful entries (a bullet line |