From e1c7c1fbfc89fd4435118da1f7b089b41f8f6fb9 Mon Sep 17 00:00:00 2001 From: Celeste Date: Thu, 27 Jan 2022 20:01:34 +0000 Subject: [PATCH] holy poop the multi variable thingy works i deed it --- src/main.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index d1c7813..c75b0db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -118,13 +118,15 @@ fn load_macro(set: String, mac: String, inputs: String, vars: Vec) -> St contents = keg.to_string(); } } - if coont == 1 { + if coont != 1 { let jazz: Vec<&str> = contents.split("\n").collect(); - contents = jazz[1].to_string(); - } - if coont == 2 { - let jazz: Vec<&str> = contents.split("\n").collect(); - contents = jazz[3].to_string(); + let mut xcont = "".to_string(); + for x in jazz { + if x.contains("[") == false && x.contains("]") == false { + xcont = format!("{}\n{}",xcont,x); + } + } + contents = xcont.to_string(); } return contents.to_string(); }