Skip to content

Commit

Permalink
Add grouping to newlines regex
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Sep 1, 2024
1 parent 83a1c6f commit 83c6f2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/regexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const LEAVES: [&str; 4] = ["verbatim", "Verbatim", "lstlisting", "minted"];

lazy_static! {
pub static ref RE_NEWLINES: Regex =
Regex::new(&format!(r"{}{}{}+", LINE_END, LINE_END, LINE_END)).unwrap();
Regex::new(&format!(r"{}{}({})+", LINE_END, LINE_END, LINE_END))
.unwrap();
pub static ref RE_TABS: Regex = Regex::new(r"\t").unwrap();
pub static ref RE_TRAIL: Regex =
Regex::new(&format!(r" +{}", LINE_END)).unwrap();
Expand Down

0 comments on commit 83c6f2f

Please sign in to comment.