Keep an eye out for docstrings for def forms. Was causing issue with the likes of (def foo "not a docstring")

This commit is contained in:
fogus 2011-12-19 08:24:00 -05:00
parent 1b97660357
commit 8b01a596ad

View file

@ -154,8 +154,8 @@
(try (require sym)
(catch Exception _)))
(let [nspace (find-ns sym)
maybe-ds (let [[_ _ ? & _] form] ?)
docstring (if (string? maybe-ds)
[maybe-ds remainder] (let [[_ _ ? & more?] form] [? more?])
docstring (if (and (string? maybe-ds) remainder)
maybe-ds
(if-let [ds (:doc (meta (second form)))]
ds