changed channel convert from case-sensitive to insensitive #685
This commit is contained in:
@@ -25,6 +25,7 @@ use crate::filter;
|
||||
use crate::yaml::ParseYaml;
|
||||
use hashbrown::HashMap;
|
||||
use serde_json::Value;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::fmt::Write;
|
||||
use std::path::Path;
|
||||
|
||||
@@ -264,7 +265,10 @@ impl Detection {
|
||||
"%Channel%" => {
|
||||
profile_converter.insert(
|
||||
"%Channel%".to_string(),
|
||||
CH_CONFIG.get(ch_str).unwrap_or(ch_str).to_string(),
|
||||
CH_CONFIG
|
||||
.get(&ch_str.to_ascii_lowercase())
|
||||
.unwrap_or(ch_str)
|
||||
.to_string(),
|
||||
);
|
||||
}
|
||||
"%Level%" => {
|
||||
|
||||
@@ -105,10 +105,10 @@ pub fn create_output_filter_config(path: &str) -> HashMap<String, String> {
|
||||
return;
|
||||
}
|
||||
|
||||
let tag_full_str = line[0].trim();
|
||||
let tag_full_str = line[0].trim().to_ascii_lowercase();
|
||||
let tag_replace_str = line[1].trim();
|
||||
|
||||
ret.insert(tag_full_str.to_owned(), tag_replace_str.to_owned());
|
||||
ret.insert(tag_full_str, tag_replace_str.to_owned());
|
||||
});
|
||||
ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user