Correctly handle comments in attributes in doctests source code
(cherry picked from commit de16ed35a3
)
This commit is contained in:
parent
bee5d0996b
commit
31236a39f8
1 changed files with 2 additions and 0 deletions
|
@ -520,6 +520,8 @@ fn handle_attr(mod_attr_pending: &mut String, source_info: &mut SourceInfo, edit
|
||||||
mod_attr_pending.clear();
|
mod_attr_pending.clear();
|
||||||
} else if mod_attr_pending.ends_with('\\') {
|
} else if mod_attr_pending.ends_with('\\') {
|
||||||
mod_attr_pending.push('n');
|
mod_attr_pending.push('n');
|
||||||
|
} else {
|
||||||
|
mod_attr_pending.push_str("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue