markdown_ppp/ast/
github_alerts.rs

1/// GitHub markdown alerts types
2#[derive(Debug, Clone, 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    /// Custom alert with a user-defined label
16    Custom(String),
17}
18
19/// GitHub alert block
20#[derive(Debug, Clone, PartialEq)]
21#[cfg_attr(feature = "ast-serde", derive(serde::Serialize, serde::Deserialize))]
22pub struct GitHubAlert {
23    /// Type of the alert
24    pub alert_type: GitHubAlertType,
25    /// Content blocks inside the alert
26    pub blocks: Vec<crate::ast::Block>,
27}