diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-08-05 22:33:09 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-08-05 22:40:08 +0300 |
commit | a39707b18a498fa3519c3772ef5f80cdbd8d3af6 (patch) | |
tree | 3d3367638a8ba48e971ead29afde0a1e3d0b41b3 | |
parent | 97b2307e4ae2223fb2f9020bfa49e0e8924a268f (diff) | |
download | riki-a39707b18a498fa3519c3772ef5f80cdbd8d3af6.tar.gz |
fix: single-quoted values may also contain newlines
Sponsored-by: author
-rw-r--r-- | src/token.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/token.rs b/src/token.rs index 76cd7b4..83e6c41 100644 --- a/src/token.rs +++ b/src/token.rs @@ -35,7 +35,7 @@ impl Default for TokenPatterns { plain: Regex::new(r#"(?P<value>[^\[]+)"#).unwrap(), word: Regex::new(r#"[-._/[:alpha:][:digit:]]+"#).unwrap(), spaces: Regex::new(r#"([[:space:]]|\n)+"#).unwrap(), - single_quoted: Regex::new(r#""(?P<value>.*?)""#).unwrap(), + single_quoted: Regex::new(r#""(?P<value>(.|\n)*?)""#).unwrap(), triple_quoted: Regex::new(r#""""(?P<value>(.|\n)*?)""""#).unwrap(), } } |