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)
|
(define (policy->string policy)
|
||||||
(string-append
|
(string-limit 200
|
||||||
(case (car policy)
|
(string-append
|
||||||
((show-if) "show ")
|
(case (car policy)
|
||||||
((hide-if) "hide "))
|
((show-if) "show ")
|
||||||
(condition->string (cadr policy))))
|
((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)
|
(define (condition->string condition)
|
||||||
(match condition
|
(match condition
|
||||||
|
|
Loading…
Reference in New Issue
Block a user