Add unicode border style.
This commit is contained in:
parent
a26773f9da
commit
595b26ac50
1 changed files with 15 additions and 4 deletions
19
table.scm
19
table.scm
|
@ -28,6 +28,8 @@
|
|||
(module
|
||||
table
|
||||
(
|
||||
*table-border-style*
|
||||
table->string
|
||||
table-tests!
|
||||
)
|
||||
|
||||
|
@ -39,6 +41,9 @@
|
|||
ansi
|
||||
testing)
|
||||
|
||||
;; Default table border style to use if not explicitly specified.
|
||||
(define *table-border-style* (make-parameter 'ascii))
|
||||
|
||||
;; Returns a list of strings representing the rows in the original
|
||||
;; string.
|
||||
(define (string->rows str)
|
||||
|
@ -156,10 +161,16 @@
|
|||
|
||||
;; Table border styles in visual form
|
||||
(define table-borders-lookup-source
|
||||
'((ascii "/~,\\"
|
||||
"| ||"
|
||||
">-+<"
|
||||
"'~^`")))
|
||||
'((ascii
|
||||
"/~,\\"
|
||||
"| ||"
|
||||
">-+<"
|
||||
"'~^`")
|
||||
(unicode
|
||||
"┌─┬┐"
|
||||
"│ ││"
|
||||
"├─┼┤"
|
||||
"└─┴┘")))
|
||||
|
||||
;; Compiled table borders for rendering
|
||||
(define table-borders-lookup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue