Finish alignment.
This commit is contained in:
parent
3f50d85412
commit
965b0432fa
4 changed files with 19 additions and 5 deletions
12
table.scm
12
table.scm
|
@ -150,8 +150,16 @@
|
|||
(if (< len w)
|
||||
(let* ((miss (- w len))
|
||||
(do-left-pad first-tab)
|
||||
(do-right-pad (or (not first-tab) last-tab)))
|
||||
(string-append line1 (string-repeat " " miss)))
|
||||
(do-right-pad (or (not first-tab) last-tab))
|
||||
(left-pad-len (if do-left-pad
|
||||
(if do-right-pad
|
||||
(- miss (quotient miss 2))
|
||||
miss)
|
||||
0))
|
||||
(right-pad-len (- miss left-pad-len))
|
||||
(left-pad (make-string left-pad-len #\space))
|
||||
(right-pad (make-string right-pad-len #\space)))
|
||||
(string-append left-pad line1 right-pad))
|
||||
line1)))
|
||||
|
||||
;; Pads all lines of this cell to required width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue