fx litchar spacing with leading and trailing spaces

svn: r6855

original commit: e5e12d6c53164f6dedae6fab261c60259db3d154
This commit is contained in:
Matthew Flatt 2007-07-08 07:01:04 +00:00
parent 70da0389e6
commit f8a2e95c60
2 changed files with 9 additions and 4 deletions

View File

@ -70,10 +70,11 @@
strs))]) strs))])
(let ([spaces (regexp-match-positions #rx"^ *" s)] (let ([spaces (regexp-match-positions #rx"^ *" s)]
[end-spaces (regexp-match-positions #rx" *$" s)]) [end-spaces (regexp-match-positions #rx" *$" s)])
(make-element "schemeinput" (make-element
(list (hspace (cdar spaces)) "schemeinputbg"
(make-element #f (list (substring s (cdar spaces) (caar end-spaces)))) (list (hspace (cdar spaces))
(hspace (- (cdar end-spaces) (caar end-spaces)))))))) (make-element "schemeinput" (list (substring s (cdar spaces) (caar end-spaces))))
(hspace (- (cdar end-spaces) (caar end-spaces))))))))
(define (verbatim s) (define (verbatim s)
(let ([strs (regexp-split #rx"\n" s)]) (let ([strs (regexp-split #rx"\n" s)])

View File

@ -234,6 +234,10 @@
font-family: Courier; font-size: 80%; font-family: Courier; font-size: 80%;
} }
.schemeinputbg {
background-color: #eeeeee;
}
.schemeparen { .schemeparen {
color: #843c24; color: #843c24;
font-family: Courier; font-size: 80%; font-family: Courier; font-size: 80%;