Skip to content

Commit c009674

Browse files
committed
Align parsing of CRLF-terminated patterns
`\r\n` was parsed as a separate TextElement of `\n`, whereas `\n` is parsed as part of the antecedent TextElement.
1 parent 099995a commit c009674

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fluent-syntax/src/parser/pattern.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ where
174174
b'\r' if self.is_byte_at(b'\n', self.ptr + 1) => {
175175
self.ptr += 1;
176176
return Ok((
177-
start_pos,
178-
self.ptr - 1,
177+
start_pos + 1,
178+
self.ptr,
179179
text_element_type,
180180
TextElementTermination::Crlf,
181181
));

0 commit comments

Comments
 (0)