Skip to main content

ensure_not_empty

Function ensure_not_empty 

Source
fn ensure_not_empty(
    content: ExpandedContent,
) -> Result<ExpandedContent, GitHubExpandError>
Expand description

Rejects a code block with nothing to show.

Checked on the built block rather than the body so that a line range past the end of the file is rejected too. Whitespace-only counts as empty: it renders as a blank fence that carries only the language name.