From c79ca40b77c7581e78333db163e1e9465e555d35 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:25:28 +0000 Subject: [PATCH] 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. --- tasks/ast_codegen/src/schema/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/ast_codegen/src/schema/mod.rs b/tasks/ast_codegen/src/schema/mod.rs index e0828f80eaeac..c1a00dc34e8b7 100644 --- a/tasks/ast_codegen/src/schema/mod.rs +++ b/tasks/ast_codegen/src/schema/mod.rs @@ -274,7 +274,7 @@ fn get_docs(attrs: &[syn::Attribute]) -> Vec { return None; } match &lit.lit { - syn::Lit::Str(lit) => Some(lit.value()), + syn::Lit::Str(lit) => Some(lit.value().trim().to_string()), _ => None, } } else {