From b8ffd3ad3dcaebddbc674e03494e0d818b21fa51 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Tue, 20 Dec 2022 15:31:36 +0100 Subject: Document meta and data loading categories --- macros/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'macros/src/lib.rs') diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 23b03712..064e45b2 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -91,7 +91,10 @@ fn documentation(attrs: &[syn::Attribute]) -> String { /// Dedent documentation text. fn dedent(text: &str) -> String { - text.lines().map(str::trim).collect::>().join("\n") + text.lines() + .map(|s| s.strip_prefix(" ").unwrap_or(s)) + .collect::>() + .join("\n") } /// Quote an optional value. -- cgit v1.2.3