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.
Whether a paragraph’s line ends before rest, the inline content after a run of its
text: the ends_line of that run (see push_html_text). It does when nothing but
empty content follows, or when the next text starts a line.
Whether the text of a paragraph’s line, text added to what came before it on its
line, ends in whitespace an HTML reader would collapse a space after it into: the
after_space of the run after it (see push_html_text). after_space says the same
of the text before text, and is the answer when text is empty.
Write text, a run of a paragraph’s text, into out as HTML: each of its lines (it
separates them with LINE_SEPARATOR) escaped by escape, the lines joined by
line_break, and a line whose whitespace an HTML reader would collapse put in a
<span style="white-space: pre-wrap">, where browsers, Qt and this crate’s own HTML
reader keep it as it is.