Skip to main content

render_block

Function render_block 

Source
pub fn render_block(markers: &Markers<'_>, body: &str) -> String
Expand description

Render the full managed block (markers + body) for embedding in a host file.

The output starts with markers.start on its own line, ends with markers.end on its own line, and the body is sandwiched with single newline separators. The body is normalised to end in a single \n so the closing marker sits on its own line regardless of caller hygiene.