1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use serde::{Deserialize, Serialize};

mod rule;
pub use rule::MatchingRule;

#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct MatchingRules {
    pub rules: Vec<MatchingRule>,
    pub priorities: Vec<String>,
}

impl Default for MatchingRules {
    fn default() -> MatchingRules {
        MatchingRules {
            rules: MatchingRule::default_rules(),
            priorities: vec![
                "next_is_same_text".to_string(),
                "all".to_string(),
                "with_reorder".to_string(),
                "without_attr".to_string(),
                "without_text".to_string(),
                "only_tag".to_string(),
            ],
        }
    }
}