Fix last doc code comment being removed if it only had one character
This commit is contained in:
parent
d22dd65835
commit
e8f1d57d80
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ pub fn beautify_doc_string(data: Symbol) -> Symbol {
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
// like the first, a last line of all stars should be omitted
|
// like the first, a last line of all stars should be omitted
|
||||||
if j > i && lines[j - 1].chars().skip(1).all(|c| c == '*') {
|
if j > i && !lines[j - 1].is_empty() && lines[j - 1].chars().all(|c| c == '*') {
|
||||||
j -= 1;
|
j -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue