From 6bc62f52cd59caa6bfa31a3b59bb03432951cddd Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Mon, 24 Jul 2023 17:48:29 -0400 Subject: [PATCH] Fix replace in block quote formatting --- src/format.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/format.rs b/src/format.rs index 8cb5efb..1e9f4d4 100644 --- a/src/format.rs +++ b/src/format.rs @@ -94,7 +94,7 @@ fn apply_block_quote>(depth: usize, content: S) -> String { let content = content.replace("

", ""); let content = content.replace("

", ""); // replace separately to avoid trailing spaces when replacing empty lines with the prefix - let content = empty.replace(content.as_ref(), format!("\n{}\n", prefix)); + let content = empty.replace_all(content.as_ref(), format!("\n{}\n", prefix)); let content = non_empty.replace_all(&content, |c: &Captures| { format!("\n{} {}", prefix, c["initial"].to_string()) });