Commit graph

35 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
84fd27e557
Delete benches/large-file.json 2024-10-06 22:42:08 +02:00
2a5432d7a6
Update README.md 2023-09-22 22:00:45 +02:00
cb1b33f065 add bench to include 2022-04-28 21:21:45 +02:00
a84ca2dc5a prepare for release 2 2022-04-28 21:19:17 +02:00
7aed458197 prepare for release 2022-04-28 21:16:43 +02:00
35332a1b26 binary cleanup 2022-04-28 21:09:50 +02:00
c5e63a743a binary cleanup 2022-04-28 20:51:56 +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
48c10805b7
Update Cargo.toml 2021-09-04 17:15:42 +02:00
69832423b4
Merge pull request #4 from Kryptos-FR/buffered
Refactor using a buffer for reading and a buffer for writing
2021-09-04 17:07:16 +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
db2be0a36c
Update README.md 2021-08-18 22:23:08 +02:00
18fd8700c7 clap hotfix 2021-08-18 19:24:12 +02:00
426fb16d7e change the api 2021-08-18 19:16:16 +02:00
376a9c53bc ready for publishing 2021-08-18 19:01:57 +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
8e45eda342 Merge remote-tracking branch 'origin/master' 2021-07-18 11:00:32 +02:00
502d152658 fix #2 indentation_level underflow 2021-07-18 11:00:21 +02:00
e161e29e0d
typo in readme 2021-07-17 23:42:37 +02:00
8c925370f7
Update README.md 2021-07-17 23:37:34 +02:00
3cdfeda36e Merge remote-tracking branch 'origin/master' 2021-07-17 23:30:11 +02:00
60ddcb0bf9 readme 2021-07-17 23:30:05 +02:00
45214e43d1
Merge pull request #1 from Nilstrieb/add-license-1
Create LICENSE
2021-07-17 23:25:54 +02:00
36c039458a
Create LICENSE 2021-07-17 23:25:44 +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