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(); }