tests: run tests with different lang settings

fix: parsing subscriber count on channel search itms
fix: add warnings for all date and numstr parsing
fix: error parsing search suggestions
This commit is contained in:
ThetaDev 2023-05-04 21:44:10 +02:00
parent 6a99540ef5
commit b88faa9d05
32 changed files with 6501 additions and 214 deletions

View file

@ -328,6 +328,21 @@ where
.ok()
}
pub fn parse_large_numstr_or_warn<F>(
string: &str,
lang: Language,
warnings: &mut Vec<String>,
) -> Option<F>
where
F: TryFrom<u64>,
{
let res = parse_large_numstr::<F>(string, lang);
if res.is_none() {
warnings.push(format!("could not parse numstr `{string}`"));
}
res
}
/// Replace all html control characters to make a string safe for inserting into HTML.
pub fn escape_html(input: &str) -> String {
let mut buf = String::with_capacity(input.len());