Skip to content

Commit

Permalink
fixed a bug where desc would not match properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rfuzzo committed Mar 21, 2024
1 parent 8304e0d commit a797455
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 102 deletions.
72 changes: 36 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[workspace.package]
name = "plox"
version = "0.3.0"
version = "0.3.1"
authors = ["Moritz Baron"]
description = "PLOX - Plugin Load Order eXpert. PLOX is a tool for analyzing and sorting your plugin load order. Supports Morrowind, OpenMW and Cyberpunk"
documentation = ""
Expand Down
34 changes: 13 additions & 21 deletions gui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,27 +123,19 @@ fn init_parser(settings: AppSettings, tx: Sender<String>) -> Option<AppData> {
}

// sort
//let mut new_order = mods.clone();
// check order first
//match check_order(&mods, &parser.order_rules) {
// true => {
// // exit
// info!("Mods are in correct order, no sorting needed.");
// let _ = tx.send("Mods are in correct order, no sorting needed.".to_string());
// }
// false => {
let mut sorter = new_stable_sorter();
let _ = tx.send("Sorting mods".to_string());
let new_order = match sorter.topo_sort(game, &mods, &parser.order_rules) {
Ok(new) => new,
Err(e) => {
error!("error sorting: {e:?}");
let _ = tx.send(format!("error sorting: {e:?}"));
return None;
}
};
//}
//}
let mut new_order = mods.iter().map(|m| m.name.clone()).collect();
if !&parser.order_rules.is_empty() {
let mut sorter = new_stable_sorter();
let _ = tx.send("Sorting mods".to_string());
new_order = match sorter.topo_sort(game, &mods, &parser.order_rules) {
Ok(new) => new,
Err(e) => {
error!("error sorting: {e:?}");
let _ = tx.send(format!("error sorting: {e:?}"));
return None;
}
};
}

let r = AppData {
game,
Expand Down
1 change: 1 addition & 0 deletions src/expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ impl TExpression for DESC {
for p in &plugins {
if let Some(description) = &p.description {
if let Ok(pattern) = regex::Regex::new(&self.regex) {
let description = &description.to_lowercase();
match self.is_negated {
true => {
if !pattern.is_match(description) {
Expand Down
Loading

0 comments on commit a797455

Please sign in to comment.