diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e273fcb..0ec2a488 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -on: [push] +on: [push, pull_request] name: Continuous integration diff --git a/src/utils/html.rs b/src/utils/html.rs index 1011a9c4..a4f5a7d9 100644 --- a/src/utils/html.rs +++ b/src/utils/html.rs @@ -128,7 +128,7 @@ mod tests { #[test] fn test_user_mention() { assert_eq!( - user_mention(123456789, ""), + user_mention(123_456_789, ""), "<pwner666>", ); } diff --git a/src/utils/markdown.rs b/src/utils/markdown.rs index faf99f7f..329d72ae 100644 --- a/src/utils/markdown.rs +++ b/src/utils/markdown.rs @@ -35,7 +35,7 @@ pub fn underline(s: &str) -> String { // underline entity, so instead of ___italic underline___ we should use // ___italic underline_\r__, where \r is a character with code 13, which // will be ignored. - if s.starts_with("_") && s.ends_with("_") { + if s.starts_with('_') && s.ends_with('_') { format!(r"__{}\r__", s) } else { format!("__{}__", s) @@ -168,7 +168,7 @@ mod tests { #[test] fn test_user_mention() { assert_eq!( - user_mention(123456789, "pwner666"), + user_mention(123_456_789, "pwner666"), "[pwner666](tg://user?id=123456789)" ); }