Handle newlines in register infobox

imgbot
Gokul Soumya 2 years ago committed by Blaž Hrastnik
parent bf773db451
commit fa83426011

@ -58,7 +58,12 @@ impl Info {
.inner() .inner()
.iter() .iter()
.map(|(ch, reg)| { .map(|(ch, reg)| {
let content = reg.read().join(", ").trim_end().to_string(); let content = reg
.read()
.get(0)
.and_then(|s| s.lines().next())
.map(String::from)
.unwrap_or_default();
(ch.to_string(), content) (ch.to_string(), content)
}) })
.collect(); .collect();

Loading…
Cancel
Save