mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Update pretty printing default depth.
This commit is contained in:
parent
d9419ef994
commit
6f605f8141
@ -1,6 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## Unreleased - ???
|
||||||
|
- Increase default nesting depth of pretty printing to `JANET_RECURSION_GUARD`
|
||||||
|
- Update meson.build
|
||||||
|
- Add option to automatically add shebang line in installed scripts with `jpm`.
|
||||||
|
- Add `partition-by` and `group-by` to the core.
|
||||||
|
|
||||||
## 1.15.3 - 2021-02-28
|
## 1.15.3 - 2021-02-28
|
||||||
- Fix a fiber bug that occured in deeply nested fibers
|
- Fix a fiber bug that occured in deeply nested fibers
|
||||||
- Add `unref` combinator to pegs.
|
- Add `unref` combinator to pegs.
|
||||||
|
@ -822,7 +822,7 @@ void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
|
|||||||
case 'P':
|
case 'P':
|
||||||
case 'p': { /* janet pretty , precision = depth */
|
case 'p': { /* janet pretty , precision = depth */
|
||||||
int depth = atoi(precision);
|
int depth = atoi(precision);
|
||||||
if (depth < 1) depth = 4;
|
if (depth < 1) depth = JANET_RECURSION_GUARD;
|
||||||
char d = c[-1];
|
char d = c[-1];
|
||||||
int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
|
int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
|
||||||
int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
|
int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
|
||||||
@ -974,7 +974,7 @@ void janet_buffer_format(
|
|||||||
case 'P':
|
case 'P':
|
||||||
case 'p': { /* janet pretty , precision = depth */
|
case 'p': { /* janet pretty , precision = depth */
|
||||||
int depth = atoi(precision);
|
int depth = atoi(precision);
|
||||||
if (depth < 1) depth = 4;
|
if (depth < 1) depth = JANET_RECURSION_GUARD;
|
||||||
char d = strfrmt[-1];
|
char d = strfrmt[-1];
|
||||||
int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
|
int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
|
||||||
int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
|
int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
|
||||||
|
Loading…
Reference in New Issue
Block a user