From 7350bf5dd9df3c6b2e50fe7349db95949e973b5f Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 26 Jan 2019 10:12:33 -0500 Subject: [PATCH] Add anchors in generated docs This allows us to link to specific functions. --- tools/gendoc.janet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/gendoc.janet b/tools/gendoc.janet index 48ae879f..279d3bc1 100644 --- a/tools/gendoc.janet +++ b/tools/gendoc.janet @@ -75,6 +75,7 @@ :ref ref :source-map sm :doc docstring} env-entry + html-key (html-escape key) binding-type (cond macro :macro ref (string :var " (" (type (get ref 0)) ")") @@ -82,7 +83,7 @@ source-ref (if-let [[path start end] sm] (string "" path " (" start ":" end ")") "")] - (string "

" (html-escape key) "

\n" + (string "

" html-key "

\n" "" binding-type "\n" "

" (trim-lead (html-escape docstring)) "

\n" source-ref)))