From 8aec25cbebacea603ae4c8510fd3be08720c0a06 Mon Sep 17 00:00:00 2001 From: Eli <100180307+EliTheGingerCat@users.noreply.github.com> Date: Tue, 14 Jan 2025 20:54:31 -0500 Subject: [PATCH] fix: remove trivia from strings --- extractor/src/doc_entry.rs | 2 +- extractor/src/doc_entry/type_definition.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/src/doc_entry.rs b/extractor/src/doc_entry.rs index 46f12c9..84f66e4 100644 --- a/extractor/src/doc_entry.rs +++ b/extractor/src/doc_entry.rs @@ -154,7 +154,7 @@ fn parse_type_declaration( doc_comment: &DocComment, within_tag: Option<&crate::tags::WithinTag<'_>> ) -> Result { - let name = declaration.type_name().to_string(); + let name = declaration.type_name().token().to_string(); let within = if let Some(within) = within_tag { within.name.as_str().to_owned() diff --git a/extractor/src/doc_entry/type_definition.rs b/extractor/src/doc_entry/type_definition.rs index b707640..a067821 100644 --- a/extractor/src/doc_entry/type_definition.rs +++ b/extractor/src/doc_entry/type_definition.rs @@ -122,7 +122,7 @@ impl<'a> TypeDocEntry<'a> { }); } }, - _ => doc_entry.lua_type = Some(type_info.to_string()) + _ => doc_entry.lua_type = Some(type_info.to_string().trim().to_string()) } }