macro-stepper: avoid too-long labels in hiding policy display
original commit: 9f3ac8648891774d723ff46d261c168e10f7b5bd
This commit is contained in:
parent
e6d3233f0c
commit
4e329ad758
|
@ -252,11 +252,17 @@ TODO
|
|||
;; ----
|
||||
|
||||
(define (policy->string policy)
|
||||
(string-append
|
||||
(case (car policy)
|
||||
((show-if) "show ")
|
||||
((hide-if) "hide "))
|
||||
(condition->string (cadr policy))))
|
||||
(string-limit 200
|
||||
(string-append
|
||||
(case (car policy)
|
||||
((show-if) "show ")
|
||||
((hide-if) "hide "))
|
||||
(condition->string (cadr policy)))))
|
||||
|
||||
(define (string-limit size s)
|
||||
(cond [(> (string-length s) size)
|
||||
(string-append (substring s 0 (- size 3)) "...")]
|
||||
[else s]))
|
||||
|
||||
(define (condition->string condition)
|
||||
(match condition
|
||||
|
|
Loading…
Reference in New Issue
Block a user