Skip to content

Commit fa5abb7

Browse files
committed
u
1 parent 470680f commit fa5abb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/comment.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,12 @@ impl ItemizedBlock {
552552
/// The original line_start likely contains indentation (whitespaces), which we'd like to
553553
/// replace with '> ' characters.
554554
fn itemized_block_quote_start(line: &str, mut line_start: String, remove_indent: usize) -> String {
555-
let quote_level = line.chars().take_while(|&c| matches!(c, '>' | ' ')).filter(|&c| c == '>').count();
555+
let quote_level = line
556+
.trim_start()
557+
.chars()
558+
.take_while(|&c| matches!(c, '>' | ' '))
559+
.filter(|&c| c == '>')
560+
.count();
556561

557562
for _ in 0..remove_indent {
558563
line_start.pop();

0 commit comments

Comments
 (0)