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