Fix --indent 0 implicitly enabling compact-output (#3232)

Now it will retain pretty-printing, just remove any indentation.

Co-authored-by: Andrew Marshall <andrew@johnandrewmarshall.com>
Co-authored-by: Gabriel Marin <marin.gabriel@protonmail.com>
This commit is contained in:
authored and GitHub committed 2025-02-01 15:09:30 +09:00
1 parent 07af9c11b7
commit d0adcbfebb
2 files changed
+30 -1

No files matched your search

+1 -1
View File
@@ -226,7 +226,7 @@ enum jv_print_flags {
JV_PRINT_SPACE2 = 1024,
};
#define JV_PRINT_INDENT_FLAGS(n) \
((n) < 0 || (n) > 7 ? JV_PRINT_TAB | JV_PRINT_PRETTY : (n) == 0 ? 0 : (n) << 8 | JV_PRINT_PRETTY)
((n) < 0 || (n) > 7 ? JV_PRINT_TAB | JV_PRINT_PRETTY : (n) << 8 | JV_PRINT_PRETTY)
void jv_dumpf(jv, FILE *f, int flags);
void jv_dump(jv, int flags);
void jv_show(jv, int flags);