mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Merge pull request #122 from selevit/markup_utils
Fix linter errors, enable ci for pull requests
This commit is contained in:
commit
6c69635f0d
3 changed files with 4 additions and 4 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
on: [push]
|
||||
on: [push, pull_request]
|
||||
|
||||
name: Continuous integration
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ mod tests {
|
|||
#[test]
|
||||
fn test_user_mention() {
|
||||
assert_eq!(
|
||||
user_mention(123456789, "<pwner666>"),
|
||||
user_mention(123_456_789, "<pwner666>"),
|
||||
"<a href=\"tg://user?id=123456789\"><pwner666></a>",
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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)"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue