diff options
author | Qrius <[email protected]> | 2024-09-26 00:11:05 +0200 |
---|---|---|
committer | Qrius <[email protected]> | 2024-09-26 00:11:05 +0200 |
commit | aea70aee365e52ab666fb34db404264a86e40b37 (patch) | |
tree | 2dc9df5b1eaf400b6aef254fb3014f99f558bedb | |
parent | b3d8f9033955440d49a4826591db713d5a86bf3a (diff) | |
download | skaldpress-aea70aee365e52ab666fb34db404264a86e40b37.tar.gz skaldpress-aea70aee365e52ab666fb34db404264a86e40b37.zip |
Strip leading whitespace in macro arguments
-rw-r--r-- | src/macro_processor/macro_processor.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 |