File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ impl ItemizedBlock {
496496 // and it's easier to reason about the final indent by just taking the length
497497 // of the new line_start. We update the indent because it effects the max width
498498 // of each formatted line.
499- line_start = itemized_block_quote_start ( line, line_start, 1 ) ;
499+ line_start = itemized_block_quote_start ( line. trim_start ( ) , line_start, 1 ) ;
500500 indent = line_start. len ( ) ;
501501 }
502502
@@ -552,7 +552,11 @@ impl ItemizedBlock {
552552/// The original line_start likely contains indentation (whitespaces), which we'd like to
553553/// replace with '> ' characters.
554554fn 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+ . chars ( )
557+ . take_while ( |& c| matches ! ( c, '>' | ' ' ) )
558+ . filter ( |& c| c == '>' )
559+ . count ( ) ;
556560
557561 for _ in 0 ..remove_indent {
558562 line_start. pop ( ) ;
You can’t perform that action at this time.
0 commit comments