INNER CODE UNIT · Rust
Some
str4d/rage · rage/build.rs:45
if let Some((l, r)) = content.split_once(" _") {
Some(Inline::Roman(l.into()))
.into_iter()
.chain(r.split(" _").flat_map(|s| {
let (l, r) = s
.split_once("_ ")
.expect("italics should always be terminated");
[
Inline::Roman(" ".into()),
Inline::Italic(l.into()),
Inline::Roman(format!(" {r}")),
]
}))
.collect()
} else {
vec![Inline::Roman(content)]
}
}