summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-08-05 22:33:09 +0300
committerLars Wirzenius <liw@liw.fi>2022-08-05 22:40:08 +0300
commita39707b18a498fa3519c3772ef5f80cdbd8d3af6 (patch)
tree3d3367638a8ba48e971ead29afde0a1e3d0b41b3
parent97b2307e4ae2223fb2f9020bfa49e0e8924a268f (diff)
downloadriki-a39707b18a498fa3519c3772ef5f80cdbd8d3af6.tar.gz
fix: single-quoted values may also contain newlines
Sponsored-by: author
-rw-r--r--src/token.rs2
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(),
}
}