From aea70aee365e52ab666fb34db404264a86e40b37 Mon Sep 17 00:00:00 2001 From: Qrius Date: Thu, 26 Sep 2024 00:11:05 +0200 Subject: Strip leading whitespace in macro arguments --- src/macro_processor/macro_processor.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/macro_processor/macro_processor.rs b/src/macro_processor/macro_processor.rs index b36783b..866fbdd 100644 --- a/src/macro_processor/macro_processor.rs +++ b/src/macro_processor/macro_processor.rs @@ -489,6 +489,11 @@ impl MacroProcessor { return Ok(out); }; + // Strip leading whitespace from arguments + for arg in &mut *args { + *arg = arg.trim().to_string(); + } + // Log macro invokation // The fact that we are here, does not ensure that the macro is actually expanded into // something useful, just that it exists, and was invoked -- cgit v1.2.3