~zainab/blog

f5324497f8b4a8ed45c42f8af33d4d91d55bb257 — zainab-ali 7 months ago 8126f1c
Upgrade mdoc and use a non-breaking space
2 files changed, 6 insertions(+), 6 deletions(-)

M nix/mdoc.bash
M src/structure.rkt
M nix/mdoc.bash => nix/mdoc.bash +2 -2
@@ 9,12 9,12 @@ catseffect=$(cs fetch -p org.typelevel:cats-effect_3:3.3.2)

# FIXME: coursier doesn't finish when there is an `error` snippet in mdoc
# Hack around this by timing out once we think it's finished
timeout 1m cs launch org.scalameta:mdoc_3:2.2.23 -- \
timeout 1m cs launch org.scalameta:mdoc_3:2.3.1 -- \
   --classpath $fs2 \
   --in src/chapters/fs2/snippets.md \
   --out src/chapters/fs2/snippets.out.md || true

timeout 5m cs launch org.scalameta:mdoc_3:2.2.23 -- \
timeout 5m cs launch org.scalameta:mdoc_3:2.3.1 -- \
	 --classpath $catseffect \
	 --in src/chapters/2022-02-12-cats-effect-ioruntime/snippets.md \
	 --out src/chapters/2022-02-12-cats-effect-ioruntime/snippets.out.md || true

M src/structure.rkt => src/structure.rkt +4 -4
@@ 34,14 34,14 @@
  (define hours-str
    (match hours
      [0 ""]
      [1 "1 hour"]
      [_ (string-append (number->string hours) " hours")]))
      [1 "1 hour"]
      [_ (string-append (number->string hours) " hours")]))
  (define minutes-str
    (match quarters
      [0 ""]
      [_ (string-append (number->string (* 15 quarters)) " minutes")]
      [_ (string-append (number->string (* 15 quarters)) " minutes")]
      ))
  (string-trim (string-append hours-str " " minutes-str)))
  (string-trim (string-append hours-str " " minutes-str)))

(define (time->html time)
  `(div ([class "time"])