properly calculate spans for intra-doc link resolution errors
This commit is contained in:
parent
6f93e93af6
commit
aa3d7a4e6e
3 changed files with 38 additions and 1 deletions
|
|
@ -527,7 +527,7 @@ fn resolution_failure(
|
|||
doc_comment_padding +
|
||||
// Each subsequent leading whitespace and `///`
|
||||
code_dox.lines().skip(1).take(line_offset - 1).fold(0, |sum, line| {
|
||||
sum + doc_comment_padding + line.len() - line.trim().len()
|
||||
sum + doc_comment_padding + line.len() - line.trim_start().len()
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue