Skip to content

Commit

Permalink
Remove tabs and \r as well
Browse files Browse the repository at this point in the history
  • Loading branch information
adamritter committed Dec 5, 2023
1 parent c592d9c commit 403d256
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/print_gron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ void recursive_print_gron(simdjson::ondemand::value element, growing_string &pat
}
*ptr++ = 'm';
}
while (s.size() > 0 && (s[s.size() - 1] == ' ' || s[s.size() - 1] == '\n'))
while (s.size() > 0 && (s[s.size() - 1] == ' ' || s[s.size() - 1] == '\n' ||
s[s.size() - 1] == '\r' || s[s.size() - 1] == '\t'))
{
s.remove_suffix(1);
}
Expand Down

0 comments on commit 403d256

Please sign in to comment.