Render table rows statically.
This commit is contained in:
parent
56815f2b35
commit
e01a6db5a6
1 changed files with 11 additions and 1 deletions
12
table.scm
12
table.scm
|
@ -201,7 +201,12 @@
|
||||||
(cell-border (get-keyword #:cell-border args (lambda () #f)))
|
(cell-border (get-keyword #:cell-border args (lambda () #f)))
|
||||||
(border-style (get-keyword #:border-style args (lambda () 'ascii)))
|
(border-style (get-keyword #:border-style args (lambda () 'ascii)))
|
||||||
(table (table-prepare tbl)))
|
(table (table-prepare tbl)))
|
||||||
""))
|
(string-intersperse
|
||||||
|
(flatten
|
||||||
|
(map (lambda (row)
|
||||||
|
(table-row->lines row "]" "|" "["))
|
||||||
|
table))
|
||||||
|
"\n")))
|
||||||
|
|
||||||
;; Performs module self-tests
|
;; Performs module self-tests
|
||||||
(define (table-tests!)
|
(define (table-tests!)
|
||||||
|
@ -255,3 +260,8 @@
|
||||||
|
|
||||||
(import table)
|
(import table)
|
||||||
(table-tests!)
|
(table-tests!)
|
||||||
|
|
||||||
|
(print
|
||||||
|
(table->string
|
||||||
|
'(("a" "bb" "ccc" "")
|
||||||
|
("" "b" "z" "x"))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue