Commit graph

18 commits

Author SHA1 Message Date
Joel Depooter
78180884c6 Handle carriage returns in source JSON whitespace
Previously any carriage return (\r) bytes in the JSON whitespace were not ignored. Instead they were included in the formatted output. This led to very bad formatting, as the indentation would include the carriage return.

With this change, carriage returns are handled the same way that newlines are: they are ignored in the source JSON whitespace.

It might be better to detect if the source JSON is using Windows (\r\n) newlines, and preserve that on the output. However, that is a much bigger change. For now I think it is sufficient to simply produce necely formatted output which uses only \n newlines.
2025-02-25 11:35:11 -08:00
7aed458197 prepare for release 2022-04-28 21:16:43 +02:00
35332a1b26 binary cleanup 2022-04-28 21:09:50 +02:00
28c691da5b cleanup 2022-04-28 20:35:33 +02:00
61e1e5d6fb make separate binary crate 2022-04-28 19:56:10 +02:00
Nicolas Musset
9652a46435
On-stack dynamic dispatch to avoid boxing 2021-08-26 22:08:28 +09:00
Nicolas Musset
8832d617a3
No need to use crate utf8-chars, we can read/write at the byte level 2021-08-22 12:01:30 +09:00
Nicolas Musset
a78e6d3e4b
Format code with rustfmt 2021-08-22 11:53:55 +09:00
Nicolas Musset
f8c49ca661
Refactor using a buffer for reading and a buffer for writing 2021-08-19 13:40:10 +09:00
426fb16d7e change the api 2021-08-18 19:16:16 +02:00
f05b911415 added #3 support drag and drop in windows 2021-07-18 11:56:01 +02:00
427f285f24 add new test 2021-07-18 11:54:17 +02:00
502d152658 fix #2 indentation_level underflow 2021-07-18 11:00:21 +02:00
96bfb05a4d added blank line 2021-07-17 23:20:52 +02:00
34b49d736c benches 2021-07-17 23:06:40 +02:00
9b7260660e options 2021-07-17 22:04:54 +02:00
d0733b1a7c works 2021-07-17 20:42:02 +02:00
bf1155cd00 initial commit 2021-07-17 17:36:29 +02:00