summaryrefslogtreecommitdiffstats
path: root/src/features/color_only.rs
blob: 305ac5e339270aba91127c450cb9c20597bfb227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::collections::HashSet;

use crate::features::raw;
use crate::features::OptionValueFunction;

/// color-only is like raw but does not override these styles.
pub fn make_feature() -> Vec<(String, OptionValueFunction)> {
    let styles: HashSet<_> = [
        "minus-style",
        "minus-emph-style",
        "zero-style",
        "plus-style",
        "plus-emph-style",
    ]
    .iter()
    .collect();
    raw::make_feature()
        .into_iter()
        .filter(|(k, _)| !styles.contains(&k.as_str()))
        .collect()
}