From 18d67e16348f3401a694a5a8d46af79610fadf49 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Wed, 16 Feb 2022 16:59:59 -0600 Subject: added definitions to apps; appended definitions to generated docs --- lazybones-documentation.lisp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lazybones-documentation.lisp') diff --git a/lazybones-documentation.lisp b/lazybones-documentation.lisp index 30ba6b6..48e55b2 100644 --- a/lazybones-documentation.lisp +++ b/lazybones-documentation.lisp @@ -14,7 +14,8 @@ endpoints (default-authorizer authorizer) default-content-type - description) + description + definitions) app (with-output-to-string (*standard-output*) (princ "# ") (princ title) (princ " - ") (princ "v") (princ version) @@ -55,7 +56,18 @@ (princ ": ") (princ (strip-newlines (documentation parser 'function))) (princ #\newline))) newline - (princ endpoint-documentation) )))))) + (princ endpoint-documentation))) + newline + (when (plusp (hash-table-count definitions)) + (princ "## Definitions") newline + (loop for name being the hash-key of definitions + for (node-id . text) being the hash-value of definitions + do (format *standard-output* + "

~a

" + node-id name) + (princ #\newline) (princ #\newline) + (princ text) + (princ #\newline) (princ #\newline))))))) (defun ensure-blockquote (string) (concatenate 'string "> " -- cgit v1.2.3