use anstyle::Style;
#[derive(Clone, Debug)]
pub struct MarkdownSegment {
pub style: Style,
pub text: String,
pub link_target: Option<String>,
}
#[derive(Clone, Debug, Default)]
pub struct MarkdownLine {
pub 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 {
pub preserve_code_indentation: bool,
pub disable_code_block_table_reparse: bool,
}
#[derive(Clone, Debug)]
pub struct HighlightedSegment {
pub style: Style,
pub text: String,
}