Improved strip-docstring to also remove empty metadata map.
This commit is contained in:
parent
3f63422e5c
commit
cfc5b0ff86
1 changed files with 1 additions and 13 deletions
|
@ -76,22 +76,10 @@
|
|||
(replace "\"" "\\\""))
|
||||
\")
|
||||
"")
|
||||
(replace #"#?\^\{\s*:doc\s*\}" "")
|
||||
(replace #"\n\s*\n" "\n")
|
||||
(replace #"\n\s*\)" ")")))
|
||||
|
||||
(defn- internal-strip-docstring
|
||||
[R internal-ds]
|
||||
(reduce (fn [raw docstring]
|
||||
(replace
|
||||
raw
|
||||
(str \" (-> docstring
|
||||
str
|
||||
(replace "\"" "\\\""))
|
||||
\")
|
||||
""))
|
||||
R
|
||||
internal-ds))
|
||||
|
||||
(defn get-var-docstring [nspace-sym sym]
|
||||
(try
|
||||
(-> `(var ~(symbol (str nspace-sym) (str sym))) eval meta :doc)
|
||||
|
|
Loading…
Reference in a new issue