Skip to content

Commit 84ec77c

Browse files
committed
Remove debug, only get if first eoln is \r
1 parent 2d38367 commit 84ec77c

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

crates/engine_bibtex/bibtex/bibtex.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,12 @@ input_ln(peekable_input_t *peekable)
533533
// For side effects - consume the eoln we saw
534534
int eoln = peekable_getc(peekable);
535535

536-
// Handle \r\n newlines on Windows by trying to consume a \n after a \r, unget if it's not that exact pair
537-
int next = peekable_getc(peekable);
538-
printf("Next Char: %d\n", next);
539-
if (!(eoln == '\r' && next == '\n')) {
540-
peekable_ungetc(peekable, next);
536+
if (eoln == '\r') {
537+
// Handle \r\n newlines on Windows by trying to consume a \n after a \r, unget if it's not that exact pair
538+
int next = peekable_getc(peekable);
539+
if (next != '\n') {
540+
peekable_ungetc(peekable, next);
541+
}
541542
}
542543

543544
while (last > 0) {

0 commit comments

Comments
 (0)