Correctly handle comments in attributes in doctests source code

This commit is contained in:
Guillaume Gomez 2024-12-13 16:19:34 +01:00
parent 5a6036a180
commit de16ed35a3

View file

@ -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");
} }
} }