parent
f291677d40
commit
0d5de88c4b
22 changed files with 43 additions and 67 deletions
|
@ -31,7 +31,7 @@ impl From<HighlightId> for Highlight {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Default)]
|
||||
pub struct RichText {
|
||||
pub text: SharedString,
|
||||
pub highlights: Vec<(Range<usize>, Highlight)>,
|
||||
|
@ -43,19 +43,6 @@ pub struct RichText {
|
|||
Option<Arc<dyn Fn(usize, Range<usize>, &mut WindowContext) -> Option<AnyView>>>,
|
||||
}
|
||||
|
||||
impl Default for RichText {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
text: SharedString::default(),
|
||||
highlights: Vec::new(),
|
||||
link_ranges: Vec::new(),
|
||||
link_urls: Arc::from([]),
|
||||
custom_ranges: Vec::new(),
|
||||
custom_ranges_tooltip_fn: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Allows one to specify extra links to the rendered markdown, which can be used
|
||||
/// for e.g. mentions.
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue