Fix replace in block quote formatting
This commit is contained in:
parent
9771d05c44
commit
6bc62f52cd
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ fn apply_block_quote<S: AsRef<str>>(depth: usize, content: S) -> String {
|
||||||
let content = content.replace("<p>", "");
|
let content = content.replace("<p>", "");
|
||||||
let content = content.replace("</p>", "");
|
let content = content.replace("</p>", "");
|
||||||
// replace separately to avoid trailing spaces when replacing empty lines with the prefix
|
// 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| {
|
let content = non_empty.replace_all(&content, |c: &Captures| {
|
||||||
format!("\n{} {}", prefix, c["initial"].to_string())
|
format!("\n{} {}", prefix, c["initial"].to_string())
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue