From 56643c8bdea6e6d2c4ec7ecf84eb38bb90d27c68 Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Sat, 18 May 2024 17:42:26 +0200 Subject: [PATCH] improve enum docs --- src/generator/templates/api/lib/enum.mako | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/generator/templates/api/lib/enum.mako b/src/generator/templates/api/lib/enum.mako index 4b1c417582..35a0d9a9b0 100644 --- a/src/generator/templates/api/lib/enum.mako +++ b/src/generator/templates/api/lib/enum.mako @@ -76,9 +76,7 @@ impl Default for Scope { // region ${enum_type} #[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)] % if e.get('description'): -% for line in e.description.splitlines(): -/// ${line} -% endfor +${rust_doc_comment(e.description)} % endif pub enum ${enum_type} { <% @@ -95,10 +93,7 @@ if not enum_descriptions: <% #print(variant_name, '=>', description) %> % if description: - % for line in description.splitlines(): - /// ${line} - % endfor - /// + ${rust_doc_comment(description)} % endif\ /// value: /// "${variant_name}"