We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
\r
1 parent 2d38367 commit 84ec77cCopy full SHA for 84ec77c
1 file changed
crates/engine_bibtex/bibtex/bibtex.c
@@ -533,11 +533,12 @@ input_ln(peekable_input_t *peekable)
533
// For side effects - consume the eoln we saw
534
int eoln = peekable_getc(peekable);
535
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);
+ if (eoln == '\r') {
+ // Handle \r\n newlines on Windows by trying to consume a \n after a \r, unget if it's not that exact pair
+ int next = peekable_getc(peekable);
+ if (next != '\n') {
+ peekable_ungetc(peekable, next);
541
+ }
542
}
543
544
while (last > 0) {
0 commit comments