markdown_ppp/ast/github_alerts.rs
1/// GitHub markdown alerts types
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3#[cfg_attr(feature = "ast-serde", derive(serde::Serialize, serde::Deserialize))]
4pub enum GitHubAlertType {
5 /// Blue note alert
6 Note,
7 /// Green tip alert
8 Tip,
9 /// Blue important alert
10 Important,
11 /// Yellow warning alert
12 Warning,
13 /// Red caution alert
14 Caution,
15}
16
17/// GitHub alert block
18#[derive(Debug, Clone, PartialEq)]
19#[cfg_attr(feature = "ast-serde", derive(serde::Serialize, serde::Deserialize))]
20pub struct GitHubAlert {
21 /// Type of the alert
22 pub alert_type: GitHubAlertType,
23 /// Content blocks inside the alert
24 pub blocks: Vec<crate::ast::Block>,
25}