File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed
src/lib/devtools/formatters Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 179
179
; ; a sequence or map as the second item when the path info is not nil.
180
180
; ; are all just seq'd maps and that the first item in the vector is a key in the map.
181
181
; ; The seq'd map is a result of `(seq value)` done in `body-lines` above
182
- (devtools.formatters.state/push-object-to-current-history! value)
182
+ (devtools.formatters.state/push-object-to-current-history! ( with-meta value { :index starting-index}) )
183
183
(let [has-continuation? (pos? starting-index)
184
184
body-markup (<standard-body> (body-lines value starting-index) has-continuation?)]
185
185
(if has-continuation?
Original file line number Diff line number Diff line change 49
49
(defn get-second-last-object-from-current-history []
50
50
(second (get-current-history ))) ; note the list is reversed
51
51
52
- (defn present-path-segment [v]
52
+ (defn present-path-segment [v & [starting-index] ]
53
53
(cond
54
54
(string? v) v
55
55
; ; we'd like to preserve keywords for easy get
56
56
(keyword? v) v
57
+ (and (number? v)
58
+ (number? starting-index)) (+ v starting-index) ; ; ensures indexing in very large objects
57
59
(number? v) v
58
60
:else " ?" ))
59
61
60
62
(defn seek-path-segment [coll val & [seq'd-map?]]
61
- (let [* (fn [[k v]]
62
- (cond
63
- ; ; we need to know the paths for keywords, these are clickable
64
- (and seq'd-map? (identical? k val))
65
- (present-path-segment k)
66
-
67
- (identical? v val)
68
- (present-path-segment k)))]
63
+ (let [starting-index (-> (get-last-object-from-current-history )
64
+ (meta )
65
+ :index )
66
+ * (fn [[k v]]
67
+ (cond
68
+ ; ; we need to know the paths for keywords, these are clickable
69
+ (and seq'd-map? (identical? k val))
70
+ (present-path-segment k)
71
+
72
+ (identical? v val)
73
+ (present-path-segment k starting-index)))]
69
74
(some * coll)))
70
75
71
76
(defn build-path-segment [parent-object object]
You can’t perform that action at this time.
0 commit comments