Skip to content

Commit bf51dc9

Browse files
committed
Fix #14 and #18
1 parent 4f50015 commit bf51dc9

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Table of contents
22
- [`quickdoc.api`](#quickdocapi) - API namespace for quickdoc.
3-
- [`quickdoc`](#quickdoc) - Generate API docs
3+
- [`quickdoc`](#quickdoc) - Generate API docs.
44
# quickdoc.api
55

66

@@ -29,4 +29,4 @@ Generate API docs. Options:
2929
* `:overrides` - overrides in the form `{namespace {:no-doc true var {:no-doc true :doc ...}}}`.
3030

3131
Returns a map containing the generated markdown string under the key `:markdown`.
32-
<br><sub>[source](https://github.com/borkdude/quickdoc/blob/main/src/quickdoc/api.cljc#L9-L76)</sub>
32+
<br><sub>[source](https://github.com/borkdude/quickdoc/blob/main/src/quickdoc/api.cljc#L9-L78)</sub>

src/quickdoc/api.cljc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@
4040
var-links true}
4141
:as opts}]
4242
(let [ana (-> (clj-kondo/run! {:lint source-paths
43-
:config {:output {:analysis
43+
:config {:skip-comments true
44+
:output {:analysis
4445
{:arglists true
4546
:var-definitions {:meta [:no-doc
46-
:skip-wiki]}
47+
:skip-wiki
48+
:arglists]}
4749
:namespace-definitions {:meta [:no-doc
4850
:skip-wiki]}}}}})
4951
:analysis)

src/quickdoc/impl.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@
8282
(str " - " summary)))
8383
"</summary>\n\n"))
8484
(println "##" (format "`%s`" (:name var)))
85-
(when-let [arg-lists (seq (:arglist-strs var))]
85+
(when-let [arg-lists (or (when-let [quoted-arglists (-> var :meta :arglists)]
86+
(if (and (seq? quoted-arglists)
87+
(= 'quote (first quoted-arglists)))
88+
(second quoted-arglists)
89+
quoted-arglists))
90+
(seq (:arglist-strs var)))]
8691
(println "``` clojure\n")
8792
(doseq [arglist arg-lists]
8893
(let [arglist (try (edn/read-string arglist)

0 commit comments

Comments
 (0)