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