doc updates

This commit is contained in:
vaclavt
2022-02-01 23:47:05 +01:00
parent d1bbe16459
commit 5d97c1df86
4 changed files with 15 additions and 11 deletions

View File

@@ -28,9 +28,9 @@
(defn doc::print (entry)
(do (print (term-green (doc::strip-backticks (second entry))) "-" (third entry))
; (print (last entry) "\n") ; doc section
(if (> (string-len (fourth entry)) 2)
(do (def examp (doc::strip-backticks (fourth entry)))
(if (> (string-len (fourth entry)) 2) ; example
(for example (string-regex-list (fourth entry) "(`.*?`)" "token")
(def examp (doc::strip-backticks (first example)))
(def pos (string-find examp "=>" 0))
(if (and pos (> pos 0))
(print (term-magenta