pub fn print(doc: &Doc, opts: &PrintOptions) -> StringExpand description
Render doc to a string. Trailing whitespace is trimmed from every line and the result ends
with exactly one newline (or is empty), so the output is stable under re-formatting.