diff options
| author | Federico Igne <git@federicoigne.com> | 2022-04-24 21:59:27 +0100 |
|---|---|---|
| committer | Federico Igne <git@federicoigne.com> | 2022-05-27 00:44:33 +0100 |
| commit | 33546fe83f06970acad2b505afd8733eb0a91b0d (patch) | |
| tree | 526d2d3e481c1945e36aeef028ea123b4747e142 | |
| parent | 912030d629ee39be2be25991ed1c8bd08b678c01 (diff) | |
| download | pangler-33546fe83f06970acad2b505afd8733eb0a91b0d.tar.gz pangler-33546fe83f06970acad2b505afd8733eb0a91b0d.zip | |
fix: enable multiline mode in regex detection
| -rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 67cea60..eef5537 100644 --- a/src/main.rs +++ b/src/main.rs | |||
| @@ -10,7 +10,7 @@ type Blocks<'a> = HashMap<&'a str,&'a str>; | |||
| 10 | 10 | ||
| 11 | fn build(blocks: &Blocks, entry: &str) -> String { | 11 | fn build(blocks: &Blocks, entry: &str) -> String { |
| 12 | lazy_static! { | 12 | lazy_static! { |
| 13 | static ref RE: Regex = Regex::new(r"([ \t]*)<<([^>\s]+)>>").unwrap(); | 13 | static ref RE: Regex = Regex::new(r"(?m)^([[:blank:]]*)<<([^>\s]+)>>").unwrap(); |
| 14 | } | 14 | } |
| 15 | if let Some(entry) = blocks.get(entry).clone() { | 15 | if let Some(entry) = blocks.get(entry).clone() { |
| 16 | RE.replace_all(entry, |caps: &Captures| | 16 | RE.replace_all(entry, |caps: &Captures| |
