Fixes GH issue #118 "Division by zero when there are no relevant expressions #1

Closed
SuzanneSoy wants to merge 1 commits from fix-div-by-zero--issue-118 into master

View File

@ -151,7 +151,7 @@
(meta ([charset "utf-8"]))
(link ([rel "stylesheet"] [type "text/css"] [href ,(string-append assets-path "main.css")])))
(body ()
,(%s->xexpr (/ covered total))
,(%s->xexpr (if (= total 0) 1 (/ covered total)))
(div ([class "code"]) ,(file->html path covered?)))))
(define (%s->xexpr %)