refactor(ast_codegen): remove excess space from start of doc comments (#4782)

I noticed that in JSON schema the `docs` property contains e.g. `" The name of the identifier being referenced."` (with an excess space on the start). Trim that off.
This commit is contained in:
overlookmotel 2024-08-09 10:25:28 +00:00
parent d4a3be86ed
commit c79ca40b77

View file

@ -274,7 +274,7 @@ fn get_docs(attrs: &[syn::Attribute]) -> Vec<String> {
return None;
}
match &lit.lit {
syn::Lit::Str(lit) => Some(lit.value()),
syn::Lit::Str(lit) => Some(lit.value().trim().to_string()),
_ => None,
}
} else {