Skip to content

Commit

Permalink
remove needless raw string hashes (clippy::needless_raw_string_hashes)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades authored and Byron committed Aug 20, 2024
1 parent 8f9d4bf commit 6e2ae15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions tests/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,14 @@ fn footnote_reference() {
#[test]
fn math() {
assert_eq!(
s(Event::InlineMath(r##"\sqrt{3x-1}+(1+x)^2"##.into())),
r##"$\sqrt{3x-1}+(1+x)^2$"##
s(Event::InlineMath(r"\sqrt{3x-1}+(1+x)^2".into())),
r"$\sqrt{3x-1}+(1+x)^2$"
);
assert_eq!(s(Event::InlineMath(r##"\sqrt{\$4}"##.into())), r##"$\sqrt{\$4}$"##);
assert_eq!(s(Event::InlineMath(r"\sqrt{\$4}".into())), r"$\sqrt{\$4}$");
assert_eq!(s(
Event::DisplayMath(
r##"\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)"##.into()
r"\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)".into()
)),
r##"$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$"##
r"$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$"
);
}
14 changes: 7 additions & 7 deletions tests/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ mod escapes {

#[test]
fn would_be_needed_for_single_backticks() {
let e: Vec<_> = Parser::new(r#"\`hi`"#).collect();
let e: Vec<_> = Parser::new(r"\`hi`").collect();
assert_eq!(
e,
vec![
Expand All @@ -1022,8 +1022,8 @@ mod escapes {
#[test]
fn it_escapes_closing_square_brackets() {
assert_eq!(
fmts_both(r#"[\[1\]](http://example.com)"#).0,
r#"[\[1\]](http://example.com)"#
fmts_both(r"[\[1\]](http://example.com)").0,
r"[\[1\]](http://example.com)"
);
}

Expand All @@ -1048,15 +1048,15 @@ mod escapes {
r#"[link](http://example.com "\"link title\"")"#
);
assert_eq!(
fmts_both(r#"[link](http://example.com '\'link title\'')"#).0,
fmts_both(r"[link](http://example.com '\'link title\'')").0,
r#"[link](http://example.com "'link title'")"#
);
assert_eq!(
fmts_both(r#"[link](http://example.com (\(link title\)))"#).0,
fmts_both(r"[link](http://example.com (\(link title\)))").0,
r#"[link](http://example.com "(link title)")"#
);
assert_eq!(
fmts_both(r#"[link](http://example.com (你好👋))"#).0,
fmts_both(r"[link](http://example.com (你好👋))").0,
r#"[link](http://example.com "你好👋")"#
);
}
Expand All @@ -1079,7 +1079,7 @@ mod escapes {

#[test]
fn make_special_characters_into_text_blocks() {
let e: Vec<_> = Parser::new(r#"hello\*there*and\*\*hello again\*\*"#).collect();
let e: Vec<_> = Parser::new(r"hello\*there*and\*\*hello again\*\*").collect();
assert_eq!(
e,
vec![
Expand Down

0 comments on commit 6e2ae15

Please sign in to comment.