| 3014 | const s = raw.trim(); |
| 3015 | if (!s) { closeList(); continue; } |
| 3016 | const bullet = s.match(/^(?:[-*•]|\d+[.)])\s+(.*)$/); |
| 3017 | if (bullet) { if (!inList) { out.push('<ul>'); inList = true; } out.push(`<li>${inline(bullet[1])}</li>`); continue; } |
| 3018 | closeList(); |
| 3019 | const head = s.match(/^\*\*(.+?):?\*\*:?$/); |
| 3020 | if (head) out.push(`<div style="font-weight:700;color:#4338ca;margin:10px 0 3px">${inline(head[1])}</div>`); |
| 3021 | else out.push(`<p style="margin:0 0 6px">${inline(s)}</p>`); |
| 3022 | } |
| 3023 | closeList(); |
| 3024 | const ov = (ai.overlays || []).map(o => o === 'zigbee' ? 'Zigbee' : 'Bluetooth/BLE'); |