mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Update pretty printing default depth.
This commit is contained in:
		| @@ -1,6 +1,12 @@ | ||||
| # Changelog | ||||
| 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 | ||||
| - Fix a fiber bug that occured in deeply nested fibers | ||||
| - Add `unref` combinator to pegs. | ||||
|   | ||||
| @@ -822,7 +822,7 @@ void janet_formatbv(JanetBuffer *b, const char *format, va_list args) { | ||||
|                 case 'P': | ||||
|                 case 'p': { /* janet pretty , precision = depth */ | ||||
|                     int depth = atoi(precision); | ||||
|                     if (depth < 1) depth = 4; | ||||
|                     if (depth < 1) depth = JANET_RECURSION_GUARD; | ||||
|                     char d = c[-1]; | ||||
|                     int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (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': { /* janet pretty , precision = depth */ | ||||
|                     int depth = atoi(precision); | ||||
|                     if (depth < 1) depth = 4; | ||||
|                     if (depth < 1) depth = JANET_RECURSION_GUARD; | ||||
|                     char d = strfrmt[-1]; | ||||
|                     int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N'); | ||||
|                     int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose