rustdoc: Write argument names as code spans
This commit is contained in:
parent
c06e62e0ce
commit
2286d8c17e
@ -138,7 +138,7 @@ fn write_args(
|
||||
fn write_arg(ctxt: ctxt, arg: doc::argdoc) {
|
||||
assert option::is_some(arg.ty);
|
||||
ctxt.w.write_line(#fmt(
|
||||
"* %s: `%s`",
|
||||
"* `%s`: `%s`",
|
||||
arg.name,
|
||||
option::get(arg.ty)
|
||||
));
|
||||
@ -152,8 +152,8 @@ fn should_write_argument_list() {
|
||||
markdown,
|
||||
"Arguments:\n\
|
||||
\n\
|
||||
* b: `int`\n\
|
||||
* c: `int`\n\
|
||||
* `b`: `int`\n\
|
||||
* `c`: `int`\n\
|
||||
\n"
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user