pub fn render_document(document: &Document, settings: &RenderSettings) -> StringExpand description
Renders a document directly with the resolved UI settings.
ยงExamples
use osp_cli::core::output::OutputFormat;
use osp_cli::ui::{Block, Document, LineBlock, LinePart, RenderSettings, render_document};
let document = Document {
blocks: vec![Block::Line(LineBlock {
parts: vec![LinePart {
text: "hello".to_string(),
token: None,
}],
})],
};
let rendered = render_document(&document, &RenderSettings::test_plain(OutputFormat::Auto));
assert!(rendered.contains("hello"));