Skip to content

Commit

Permalink
refactor(ast_codegen): remove excess space from start of doc comments (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
overlookmotel committed Aug 9, 2024
1 parent d4a3be8 commit c79ca40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/ast_codegen/src/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c79ca40

Please sign in to comment.