use anstyle::Style;
#[derive(Clone, Debug)]
pub struct MarkdownSegment {
style: Style,
text: String,
link_target: Option<String>,
}
#[derive(Clone, Debug, Default)]
pub struct MarkdownLine {
segments: Vec<MarkdownSegment>,
}
impl MarkdownLine {
pub fn is_empty(&self) -> bool {
self.segments.iter().all(|segment| segment.text.trim().is_empty())
}
}
#[derive(Debug, Clone, Copy, Default)]
pub struct RenderMarkdownOptions {
preserve_code_indentation: bool,
disable_code_block_table_reparse: bool,
table_max_width: Option<usize>,
}
#[derive(Clone, Debug)]
pub struct HighlightedSegment {
style: Style,
text: String,
}