;; Extension — callout / admonition block. (st-bootstrap-classes!) (content/bootstrap!) (content-bootstrap-markdown!) (content-bootstrap-text!) (content-bootstrap-callout!) (define c (mk-callout "c" "warning" "Be careful")) ;; ── identity ── (content-test "callout is block" (block? c) true) (content-test "callout? yes" (callout? c) true) (content-test "callout type" (blk-type c) "callout") (content-test "callout kind" (callout-kind c) "warning") ;; ── render ── (content-test "callout html" (asHTML c) "") (content-test "callout sx" (asSx c) "(aside :class \"callout callout-warning\" \"Be careful\")") (content-test "callout text" (asText c) "Be careful") (content-test "callout markdown" (asMarkdown c) "> **warning:** Be careful") ;; ── html escapes text ── (content-test "callout html escapes" (asHTML (mk-callout "c" "note" "a < b")) "") ;; ── in a document ── (define d (doc-append (doc-append (doc-empty "d") (mk-heading "h" 1 "T")) c)) (content-test "doc with callout html" (asHTML d) "