nmd_core/compilation/compilation_rule/
constants.rs

1use once_cell::sync::Lazy;
2use regex::Regex;
3
4use crate::codex::modifier::constants::NEW_LINE_PATTERN;
5
6
7pub static DOUBLE_NEW_LINE_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(&format!("{}{{2}}", NEW_LINE_PATTERN)).unwrap());
8
9
10pub const SPACE_TAB_EQUIVALENCE: &str = r"   ";
11
12pub static ESCAPE_HTML: Lazy<Vec<(Regex, String)>> = Lazy::new(|| vec![
13    (Regex::new(r"<").unwrap(), "&lt;".to_string()),
14    (Regex::new(r">").unwrap(), "&gt;".to_string()),
15]);