Models often close a fenced block on the same line as the last content. Require only an optional newline before the closing fence so mermaid and chart payloads are extracted instead of returned still-fenced.