Lines of
src/utils.rs
from check-in f5ed284f8c
that are changed by the sequence of edits moving toward
check-in 6ce625a569:
1: use crate::Cursor;
2:
3: use lazy_static::lazy_static;
4: use regex::Regex;
5:
6: lazy_static! {
c996f5c871 2026-01-12 7: pub static ref RE_SPECIAL: Regex = Regex::new(r"([\-_*\[\]()~`>#+|{}\.!])").unwrap();
8: pub static ref RE_DOMAIN: Regex = Regex::new(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$").unwrap();
9: }
10:
11: /// `Attachment` object to store number attachment data and corresponding file name
12: #[derive(Debug)]
13: pub struct Attachment {
14: pub data: Cursor<Vec<u8>>,
15: pub name: String,
16: }