mermaid_render: Remove spurious debug assert (#58341)

This debug assert was actually invalid, and panicked in debug builds on
valid diagrams. We start building a node only when we find a
`translate()` that we need to fix up, but unconditionally call
`finish_node`. But since `finish_node` does `if let Some(...) =
self.building.take()`, it's a no-op if there is no node being built, so
it's safe to call.

Renamed to `maybe_finish_node` to communicate this fact

Release Notes:

- N/A or Added/Fixed/Improved ...
4eab06968bCameron Mcloughlin committed on 6/2/2026, 2:57:44 PM· committed by GitHubparentb1025e8
3 files changedLine totals unavailable