nyxt
nyxt copied to clipboard
Use `spinneret:with-html` instead of `:raw` tag
Using :raw
implies opaque HTML strings passed to it, which is never good. Especially compared to Spinneret-native nested with-html
approach: we can call HTML-printing functions inside the top-level HTML generating functions, so that HTML is recursively nested way. Example for describe-function
:
(def ... describe-function ()
(flet ((method-desc (method)
(spinneret:with-html
...)))
(spinneret:with-html-string
...
(:nsection
:title "Methods"
(dolist (method (mopu:generic-function-methods
(symbol-function input)))
(method-desc method)))
...)))
Instead of
(def ... describe-function ()
(flet ((method-desc (method)
(spinneret:with-html-STRING
...)))
(spinneret:with-html-string
...
(:nsection
:title "Methods"
(dolist (method (mopu:generic-function-methods
(symbol-function input)))
(:RAW (method-desc method))))
...)))
No need for :raw
and opaque string-returning
CC @hgluka: we've discussed this problem today