| 1 | use std::collections::HashSet; |
| 2 | |
| 3 | use crate::features::raw; |
| 4 | use crate::features::OptionValueFunction; |
| 5 | |
| 6 | /// color-only is like raw but does not override these styles. |
| 7 | pub fn make_feature() -> Vec<(String, OptionValueFunction)> { |
| 8 | let styles: HashSet<_> = [ |
| 9 | "minus-style", |
| 10 | "minus-emph-style", |
| 11 | "zero-style", |
| 12 | "plus-style", |
| 13 | "plus-emph-style", |
| 14 | ] |
| 15 | .iter() |
| 16 | .collect(); |
| 17 | raw::make_feature() |
| 18 | .into_iter() |
| 19 | .filter(|(k, _)| !styles.contains(&k.as_str())) |
| 20 | .collect() |
| 21 | } |