diff options
author | Teddy Wing | 2020-07-22 01:22:44 +0200 |
---|---|---|
committer | Teddy Wing | 2020-07-22 01:22:44 +0200 |
commit | 848ecbcdf2ae15a6b74bb348385709098f2c700a (patch) | |
tree | 20ab24477f5f84429fed20b55f0c81ef98e398cb /src | |
parent | 7f60ab275bce53ebc3d770fbda7439c4c4d7c8c6 (diff) | |
download | git-suggestion-848ecbcdf2ae15a6b74bb348385709098f2c700a.tar.bz2 |
Suggestion.suggestion: Handle "\r\n"
Update the regex matcher to allow both LF line endings and CRLF.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -86,7 +86,7 @@ impl Suggestion { } fn suggestion(&self) -> String { - let re = Regex::new(r"(?s).*```\s*suggestion\n").unwrap(); + let re = Regex::new(r"(?s).*(?-s)```\s*suggestion.*\n").unwrap(); let s = re.replace(&self.suggestion, "+"); s.replace("```", "") } |