File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -314,8 +314,13 @@ impl EmitterWriter {
314314 // | |______foo
315315 // | baz
316316 add_annotation_to_file ( & mut output, file. clone ( ) , ann. line_start , ann. as_start ( ) ) ;
317+ // 4 is the minimum vertical length of a multiline span when presented: two lines
318+ // of code and two lines of underline. This is not true for the special case where
319+ // the beginning doesn't have an underline, but the current logic seems to be
320+ // working correctly.
317321 let middle = min ( ann. line_start + 4 , ann. line_end ) ;
318322 for line in ann. line_start + 1 ..middle {
323+ // Every `|` that joins the beginning of the span (`___^`) to the end (`|__^`).
319324 add_annotation_to_file ( & mut output, file. clone ( ) , line, ann. as_line ( ) ) ;
320325 }
321326 if middle < ann. line_end - 1 {
You can’t perform that action at this time.
0 commit comments