A block renders one node
The message
MARKLESS_BLOCK_SIBLING_NODES: <subject> is a second node in the same block. A component body and each @if, @else, @for, @empty, @switch case, @try, @pending and @catch arm render exactly one node. (@tsrx/yuku reported: <message>)
Each block hands exactly one node to the place it renders into. A fragment `<>…</>` or one wrapping element is that node, and it can hold as many children as you need.
Wrap the nodes in one fragment: put `<>` before the first and `</>` after the last, as in `<><h2>Title</h2><ul>…</ul></>`. A fragment adds no element to the page. One wrapping element, like `<div>`, works too.
https://markless.dev/errors/MARKLESS_BLOCK_SIBLING_NODESWords in angle brackets change from case to case.
Why
A component body renders exactly one node, and so does each @if, @else, @for, @empty, @switch case, @try, @pending and @catch arm. A node is an element, a fragment, or another @ block. Here a second node follows the first in the same block.
Fix
Wrap the nodes in a fragment, <> … </>, which adds no element to the page. One wrapping element, like <div>, works too.
@try { <> <h2>{report.title}</h2> <p>{report.total}</p> </>} @pending { <p>Loading…</p>}