bump regex to 0.2

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko
2017-02-26 15:09:09 +01:00
parent b9dfd29ce6
commit 3323056893
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ pub struct StringFormat<'a> {
// FIXME: simplify this!
pub fn rewrite_string<'a>(orig: &str, fmt: &StringFormat<'a>) -> Option<String> {
// Strip line breaks.
let re = Regex::new(r"([^\\](\\\\)*)\\[\n\r][:space:]*").unwrap();
let re = Regex::new(r"([^\\](\\\\)*)\\[\n\r][[:space:]]*").unwrap();
let stripped_str = re.replace_all(orig, "$1");
let graphemes = UnicodeSegmentation::graphemes(&*stripped_str, false).collect::<Vec<&str>>();