From 8d8fb0572a189a10eedc929ab42fba6a915ab7a0 Mon Sep 17 00:00:00 2001 From: Jan Loewe Date: Mon, 17 Apr 2023 12:43:16 +0200 Subject: [PATCH] fix(regex): match windows line endings aswell (#22) --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 59a8299..b4ac8f8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,7 @@ fn handle_supports(pre: &dyn Preprocessor, sub_args: &ArgMatches) -> ! { } lazy_static! { - static ref HEADER_RE: Regex = Regex::new(r"(?P
---\n((.+\n)+)---)").unwrap(); + static ref HEADER_RE: Regex = Regex::new(r"(?P
---\r?\n((.+\r?\n)+)---)").unwrap(); } /// A pre-processor that removes header between ---