diff --git a/render.rkt b/render.rkt index 937058d..b3c5158 100644 --- a/render.rkt +++ b/render.rkt @@ -1,32 +1,36 @@ #lang racket -(require markdown markdown/display-xexpr +(require markdown markdown/display-xexpr markdown/toc (prefix-in mathml: "ext-mathml/main.rkt") (prefix-in syntax: "ext-syntax/main.rkt")) (define input (port->string (current-input-port))) (define output-raw (parse-markdown input)) (define output-cooked (mathml:transform-xexprs (syntax:transform-xexprs output-raw))) +(define output-toc (toc output-cooked)) (define styles (string-append (mathml:get-styles) (syntax:get-styles))) (define document `(html - ((lang "en")) + ([lang "en"]) (head () - (meta ((charset "utf-8"))) + (meta ([charset "utf-8"])) (title () "meow meow meow") - (meta ((name "viewport") (content "width=device-width, initial-scale=1"))) - (meta ((name "description") (content "prototype racket markdown system uwu"))) + (meta ([name "viewport"] [content "width=device-width, initial-scale=1"])) + (meta ([name "description"] [content "prototype racket markdown system uwu"])) ; - (style ((type "text/css")) ,styles)) + (style ([type "text/css"]) ,styles)) (body () + (nav + () + ,output-toc) (main () ,@output-cooked) - (div ((style "display: none")) "__X_MATHJAX_POLYFILL_PLACEHOLDER__")))) + (div ([style "display: none"]) "__X_MATHJAX_POLYFILL_PLACEHOLDER__")))) (display "") (display-xexpr document)