moved coloring to css file
This commit is contained in:
parent
94defd5fc2
commit
c01a64fa42
|
@ -129,12 +129,12 @@
|
||||||
'((br ()))))
|
'((br ()))))
|
||||||
|
|
||||||
(define (mode-xml mode body)
|
(define (mode-xml mode body)
|
||||||
(define color
|
(define class
|
||||||
(case mode
|
(case mode
|
||||||
[(yes) "green"]
|
[(yes) "covered"]
|
||||||
[(no) "red"]
|
[(no) "uncovered"]
|
||||||
[(missing) "black"]))
|
[(missing) "missing"]))
|
||||||
`(span ((style ,(string-append "color:" color))) ,@body))
|
`(span ((class ,class)) ,@body))
|
||||||
|
|
||||||
(module+ test
|
(module+ test
|
||||||
(define (test file out)
|
(define (test file out)
|
||||||
|
@ -145,5 +145,5 @@
|
||||||
(clear-coverage!))
|
(clear-coverage!))
|
||||||
(define f (path->string (simplify-path path)))
|
(define f (path->string (simplify-path path)))
|
||||||
(test f
|
(test f
|
||||||
`((span ((style "color:green"))
|
`((span ((class "covered"))
|
||||||
,@(encode-string (file->string f))))))
|
,@(encode-string (file->string f))))))
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
.code {
|
.code {
|
||||||
font-family: "Lucida Console", Monaco, monospace;
|
font-family: "Lucida Console", Monaco, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uncovered {
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.covered {
|
||||||
|
color:green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.missing {}
|
Loading…
Reference in New Issue
Block a user