Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private static ImmutableList<String> stringComponents(
// continue below
} else if (hasEscapedWhitespaceAt(text, idx) != -1) {
// continue below
} else if (hasEscapedNewlineAt(text, idx) != -1) {
} else if (hasEscapedNewlineAt(text, idx) != -1 || hasEscapedBackslashAt(text, idx) != -1) {
int length;
while ((length = hasEscapedNewlineAt(text, idx)) != -1) {
idx += length;
Expand All @@ -302,6 +302,13 @@ private static ImmutableList<String> stringComponents(
return result.build();
}

static int hasEscapedBackslashAt(String input, int idx) {
if (input.startsWith("\\\\", idx)) {
return 2;
}
return -1;
}

static int hasEscapedWhitespaceAt(String input, int idx) {
if (input.startsWith("\\t", idx)) {
return 2;
Expand Down