diff --git a/chute/Cargo.toml b/chute/Cargo.toml index 018c7c9..6caf77b 100644 --- a/chute/Cargo.toml +++ b/chute/Cargo.toml @@ -19,7 +19,7 @@ required-features = ["bin"] [dependencies] colored = "2.0" -pulldown-cmark = { version = "0.10", default-features = false, features = ["simd", "html"] } +pulldown-cmark = { version = "0.11", default-features = false, features = ["simd", "html"] } notify = "6" unicode_categories = "0.1" time = { version = "0.3", optional = true, features = ["formatting", "macros", "local-offset"] } diff --git a/chute/src/lib.rs b/chute/src/lib.rs index 8d3c396..269d4ea 100644 --- a/chute/src/lib.rs +++ b/chute/src/lib.rs @@ -496,13 +496,13 @@ fn process_inner>( skip: !syntax_highlighting, }; - let mut output = Vec::with_capacity(input.len() * 2); + let mut output = String::with_capacity(input.len() * 2); // Write HTML from specified file to output file (buffered for performance) - html::write_html(&mut output, parser)?; + html::push_html(&mut output, parser); // Write output - write_file.write_all(&output)?; + write_file.write_all(output.as_bytes())?; // Writes footer write_file.write_all(footer)?;