From 924b4bfc2e5ffbd52f1eec4c76d1009635902913 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sat, 18 Sep 2021 16:54:12 -0700 Subject: [PATCH] Fix incorrectly ordered classes --- src/utils/mod.rs | 8 ++++---- tests/rendered_output.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 02b56e46..a9d4e991 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -338,7 +338,7 @@ impl<'a> SyntaxHighlighter<'a> { } self.is_playground = true; return Event::Html(CowStr::from(format!( - r#"
"#,
+                                r#"
"#,
                                 classes.join(" ")
                             )));
                         } else {
@@ -613,7 +613,7 @@ more text with spaces
 ```
 "#;
 
-            let expected = r#"
"#; + let expected = r#"
"#; assert_eq!( render_markdown( input, @@ -643,7 +643,7 @@ more text with spaces ``` "#; - let expected = r#"
"#; + let expected = r#"
"#; assert_eq!( render_markdown( input, @@ -673,7 +673,7 @@ more text with spaces ``` "#; - let expected = r#"
"#; + let expected = r#"
"#; assert_eq!( render_markdown( input, diff --git a/tests/rendered_output.rs b/tests/rendered_output.rs index 282930a4..9825fc26 100644 --- a/tests/rendered_output.rs +++ b/tests/rendered_output.rs @@ -144,7 +144,7 @@ fn rendered_code_has_playground_stuff() { md.build().unwrap(); let nested = temp.path().join("book/first/nested.html"); - let playground_class = vec![r#"class="playground""#]; + let playground_class = vec![r#"class="syntect playground""#]; assert_contains_strings(nested, &playground_class); @@ -392,7 +392,7 @@ fn able_to_include_playground_files_in_chapters() { let second = temp.path().join("book/second.html"); let playground_strings = &[ - r#"class="playground""#, + r#"class="syntect playground""#, r#"println!("Hello World!"#, ];