Skip to content

Commit 1004666

Browse files
Zalatharpoliorcetics
authored andcommitted
compiletest: Make a FIXME for escaped newlines less confusing
The old FIXME implies that we don't support escaped newlines, but in fact it was added in the same patch that added support for escaped newlines. The new FIXME makes it clear that we do currently support this, and that the FIXME is for doing so in a less ad-hoc way.
1 parent 3063b46 commit 1004666

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/compiletest/src/header.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,9 @@ fn parse_normalize_rule(raw_value: &str) -> Option<(String, String)> {
11561156
.captures(raw_value)?;
11571157
let regex = captures["regex"].to_owned();
11581158
let replacement = captures["replacement"].to_owned();
1159-
// FIXME: Support escaped new-line in strings.
1159+
// A `\n` sequence in the replacement becomes an actual newline.
1160+
// FIXME: Do unescaping in a less ad-hoc way, and perhaps support escaped
1161+
// backslashes and double-quotes.
11601162
let replacement = replacement.replace("\\n", "\n");
11611163
Some((regex, replacement))
11621164
}

0 commit comments

Comments
 (0)