mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
adding italic and strikethrough ansi escapes
This commit is contained in:
parent
9fd9b88660
commit
5a54ecce1d
2 changed files with 40 additions and 2 deletions
|
@ -389,8 +389,42 @@
|
|||
;;>
|
||||
;;> If ANSI escapes are not enabled, return \var{str}.
|
||||
|
||||
(define underline (make-wrap-procedure (underline-escape)
|
||||
(reset-underline-escape)))
|
||||
(define underline
|
||||
(make-wrap-procedure (underline-escape) (reset-underline-escape)))
|
||||
|
||||
;;> Return a string consisting of an ANSI escape code to select
|
||||
;;> italic style.
|
||||
|
||||
(define italic-escape
|
||||
(make-simple-escape-procedure 3))
|
||||
|
||||
;;> Return a string consisting of an ANSI escape code to select
|
||||
;;> non-italic style.
|
||||
|
||||
(define reset-italic-escape
|
||||
(make-simple-escape-procedure 23))
|
||||
|
||||
;;> Returns \var{str} optionally wrapped in italic escapes.
|
||||
|
||||
(define italic
|
||||
(make-wrap-procedure (italic-escape) (reset-italic-escape)))
|
||||
|
||||
;;> Return a string consisting of an ANSI escape code to select
|
||||
;;> strikethrough style.
|
||||
|
||||
(define strikethrough-escape
|
||||
(make-simple-escape-procedure 9))
|
||||
|
||||
;;> Return a string consisting of an ANSI escape code to select
|
||||
;;> non-strikethrough style.
|
||||
|
||||
(define reset-strikethrough-escape
|
||||
(make-simple-escape-procedure 29))
|
||||
|
||||
;;> Returns \var{str} optionally wrapped in strikethrough escapes.
|
||||
|
||||
(define strikethrough
|
||||
(make-wrap-procedure (strikethrough-escape) (reset-strikethrough-escape)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
|
|
@ -24,12 +24,16 @@
|
|||
bold
|
||||
underline
|
||||
negative
|
||||
italic
|
||||
strikethrough
|
||||
rgb rgb-background
|
||||
gray gray-background
|
||||
rgb24 rgb24-background
|
||||
bold-escape reset-bold-escape
|
||||
underline-escape reset-underline-escape
|
||||
negative-escape reset-negative-escape
|
||||
italic-escape reset-italic-escape
|
||||
strikethrough-escape reset-strikethrough-escape
|
||||
|
||||
ansi-escapes-enabled?)
|
||||
(import (scheme base)
|
||||
|
|
Loading…
Add table
Reference in a new issue