fix(macros/generate/convert/auxiliary/c/arguments): Accept newlines
Multiple lines in one comment were not checked for, which resulted in only one `*` before instead of a new one after every `\n`.
This commit is contained in:
parent
a66c687421
commit
bfeb62033a
|
@ -36,7 +36,14 @@ impl Attribute {
|
||||||
.iter()
|
.iter()
|
||||||
.map(|attr| {
|
.map(|attr| {
|
||||||
if let Attribute::doc(doc_comment) = attr {
|
if let Attribute::doc(doc_comment) = attr {
|
||||||
format!("*{}\n", doc_comment)
|
if doc_comment.is_empty() {
|
||||||
|
"*\n".to_owned()
|
||||||
|
} else {
|
||||||
|
doc_comment
|
||||||
|
.lines()
|
||||||
|
.map(|line| format!("*{}\n", line))
|
||||||
|
.collect::<String>()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
attr.to_auxiliary_c()
|
attr.to_auxiliary_c()
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue