mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-24 13:34:52 +00:00
feat: check doc comments by the compiler
This commit is contained in:
parent
777af37de7
commit
0c47c95f25
4 changed files with 108 additions and 6 deletions
|
@ -178,9 +178,9 @@ pub fn trim_eliminate_top_indent(code: String) -> String {
|
|||
let mut result = String::new();
|
||||
for line in code.lines() {
|
||||
if line.len() > indent {
|
||||
result.push_str(&line[indent..]);
|
||||
result.push_str(line[indent..].trim_end());
|
||||
} else {
|
||||
result.push_str(line);
|
||||
result.push_str(line.trim_end());
|
||||
}
|
||||
result.push('\n');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue