File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 3
3
## master (unreleased)
4
4
5
5
* [ #314 ] ( https://github.com/clojure-emacs/orchard/pull/314 ) : Print: add special printing rules for records and allow meta : type overrides.
6
+ * [ #336 ] ( https://github.com/clojure-emacs/orchard/pull/336 ) : Inspector: tune pretty-printing mode.
6
7
7
8
## 0.34.0 (2025-04-18)
8
9
Original file line number Diff line number Diff line change 378
378
" Returns true of `s` is a long string, more than 20 character or
379
379
containing newlines."
380
380
[^String s]
381
- (or (.contains s " \n " ) (> (count s) 20 )))
381
+ (or (.contains s " \n " ) (> (count s) 50 )))
382
382
383
383
(defn- render-map-separator
384
384
" Render the map separator according to `rendered-key`. If
Original file line number Diff line number Diff line change 208
208
" Pretty print the object `x` with `orchard.pp/pprint` and return it as
209
209
a string. The `:indentation` option is the number of spaces used for
210
210
indentation."
211
- [x & [{:keys [indentation]}]]
212
- (let [writer (TruncatingStringWriter. *max-atom-length* *max-total-length*)
213
- indentation-str (apply str (repeat (or indentation 0 ) " " ))]
214
- (try (pp/pprint writer x {:indentation indentation-str})
215
- (catch TruncatingStringWriter$TotalLimitExceeded _))
216
- (str/trimr (.toString writer))))
211
+ ([x]
212
+ (pprint-str x {}))
213
+ ([x options]
214
+ (let [{:keys [indentation] :or {indentation 0 }} options
215
+ writer (TruncatingStringWriter. *max-atom-length* *max-total-length*)
216
+ indentation-str (apply str (repeat indentation " " ))]
217
+ (try (pp/pprint writer x {:indentation indentation-str
218
+ :max-width (+ indentation 80 )})
219
+ (catch TruncatingStringWriter$TotalLimitExceeded _))
220
+ (str/trimr (.toString writer)))))
You can’t perform that action at this time.
0 commit comments