Skip to content

Commit

Permalink
Do not truncate rules on keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
DerFetzer committed Apr 26, 2024
1 parent bd26f49 commit 272b8ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
[package]
name = "afrotd"
version = "0.4.0"
version = "0.4.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl RulesParser {
);

let re_new_page = Regex::new(r"-?\n\x0C").unwrap();
let re_section = Regex::new(r"(?s)Abschnitt .*?Artikel").unwrap();
let re_section = Regex::new(r"(?sm)^Abschnitt .*?Artikel").unwrap();
let re_new_chapter = Regex::new(r"\n\x0C.*\n.*\n\n").unwrap();

text = re_new_page.replace_all(&text, "").to_string();
Expand Down

0 comments on commit 272b8ad

Please sign in to comment.