rustdoc: Add a blank line after the return value description

This commit is contained in:
Brian Anderson 2012-01-19 14:29:45 -08:00
parent df9bf1f45f
commit 840a057556

View file

@ -208,6 +208,7 @@ fn write_return(
alt doc.desc {
some(d) {
ctxt.w.write_line(d);
ctxt.w.write_line("");
}
none { }
}
@ -240,6 +241,14 @@ fn should_not_write_return_type_when_there_is_none() {
assert !str::contains(markdown, "Returns");
}
#[test]
fn should_write_blank_line_after_return_description() {
let markdown = test::render(
"#[doc(return = \"blorp\")] fn a() -> int { }"
);
assert str::contains(markdown, "blorp\n\n");
}
#[cfg(test)]
mod test {
fn render(source: str) -> str {