Skip to main content

character_format_from_span

Function character_format_from_span 

Source
pub fn character_format_from_span(
    span: &ParsedSpan,
    is_code_block: bool,
) -> CharacterFormat
Expand description

Convert a ParsedSpan (parser output) into the CharacterFormat used by FormatRun. is_code_block forces monospace as the font family for every span inside a code block.