use std::ops::Range; use teams_core::{FontSize, PROFILE_LINK_PREFIX, Span}; pub const IMAGE_PLACEHOLDER: &str = "[image]"; pub const CODE_PADDING: &str = "\u{2004}"; const URL_PREFIXES: [&str; 3] = ["https://", "http://", "www."]; const TRAILING_PUNCTUATION: &str = ".,;:!?'\""; const BASE_FONT_PIXELS: f32 = 14.; // CSS absolute sizes Teams sends: xx-small = 9px, x-large = 24px, against a 14px body. const SMALL_SCALE: f32 = 9. / 14.; const LARGE_SCALE: f32 = 24. / 14.; const SCRIPT_SCALE: f32 = 0.75; const SUPERSCRIPT_RAISE: f32 = 0.35; const SUBSCRIPT_DROP: f32 = 0.2; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Script { Super, Sub, } #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] pub struct StyleFlags { pub bold: bool, pub italic: bool, pub code: bool, pub mention: bool, pub link: bool, pub strike: bool, pub underline: bool, pub script: Option