* Return true when the block has any meaningful entries (a bullet line * starting with `-`, `*`, or a digit) — vs. being empty / just * whitespace / just sub-section headers with nothing under them.
(body)
| 142 | * whitespace / just sub-section headers with nothing under them. |
| 143 | */ |
| 144 | function blockHasContent(body) { |
| 145 | for (const line of body) { |
| 146 | if (/^\s*([-*]|\d+\.)\s+/.test(line)) return true; |
| 147 | } |
| 148 | return false; |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * Trim trailing blank lines from an array of lines, then return. |