Method: (WRITE-CODE-DESCRIPTOR AROUND DESCRIPTOR T HTML-GENERATOR)

Source

(defmethod write-code-descriptor :around ((descriptor descriptor) part (generator html-generator))
  (<:div :class (strcat "computational-element-link "
                        "computational-element-link-" (label-prefix descriptor))
         (<:p (<:a :name (make-anchor-name descriptor)
                   :href (make-anchor-link descriptor)
		   :class (format nil "descriptor ~a" (label-prefix descriptor))
                   (<:as-html (pretty-label-prefix descriptor))
                   " "
                   (<:as-html (html-name descriptor)))
              " "
              (when-bind first-sentence (docstring-first-sentence descriptor)
                (<:as-html first-sentence))))
  (<qbook-page :title (strcat (pretty-label-prefix descriptor) " " (html-name descriptor))
               :file-name (make-anchor-link descriptor)
               :stylesheet "../style.css"
               :printsheet "../print.css"
               (<:div :class "computational-element"
                      (<:h1 (<:as-html (pretty-label-prefix descriptor)) ": " (<:as-html (html-name descriptor)))
                      (<:div :class "contents"
                             (when (docstring descriptor)
                               (<:h2 "Documentation")
                               (<:blockquote
                                (<:as-html (docstring descriptor))))
                             (call-next-method)
                             (<:h2 "Source")
                             (<:pre (<:code :class "code" (<:as-html (text part))))
                             (<:a :href (strcat "../" (output-file part) "#" (make-anchor-name (descriptor part)))
                                  "Source Context")))))
Source Context