Skip to content

Commit

Permalink
fix: not splitting arguments given correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
thepigeongenerator committed Nov 26, 2024
1 parent 96b3f91 commit b70df17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub fn insert_definitions(contents: &String, definitions: &Vec<Definition>) -> S
// otherwise, extract the different arguments and apply them to the contents
let mut i = 0;
let mut insert = definition.contents.to_owned();
let arg_matcher = Regex::new(r#""(.*)""#).unwrap(); // regex to match anything (excl. newline) between double quotes
let arg_matcher = Regex::new(r#""(.*?)""#).unwrap(); // regex to match anything (excl. newline) between double quotes

for arg in arg_matcher.captures_iter(args) {
let arg_val = arg.get(1).unwrap().as_str(); // get the value within the quotes
Expand Down

0 comments on commit b70df17

Please sign in to comment.