Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Doc Hover: "no doc" message for local symbol (instead of Exception)

  • Loading branch information...
commit b85db5521f7856948dc90c9dddfd152dc3d38598 1 parent a3cbbc2
@laurentpetit authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 ccw.util/src/clj/ccw/util/doc_utils.clj
12 ccw.util/src/clj/ccw/util/doc_utils.clj
@@ -26,13 +26,15 @@
:text (format "%s:\n%s" title body)))
(defn render-identity [renderer name ns]
- (condp = renderer
- :html (format "<b>%s</b> %s" name (or ns ""))
- :text (format "%s %s" name (or ns ""))))
+ (when-not (str/blank? name)
+ (condp = renderer
+ :html (format "<b>%s</b> %s" name (or ns ""))
+ :text (format "%s %s" name (or ns "")))))
(defn- render-sections [renderer sections no-sections-text]
(let [s (condp = renderer
- :html (apply str (mapcat vector (repeat "<p>") (keep identity sections) (repeat "</p>")))
+ :html (when-let [sections (keep identity sections)]
+ (apply str (mapcat vector (repeat "<p>") sections (repeat "</p>"))))
:text (str/join "\n\n" (keep identity sections)))]
(if (str/blank? s)
(condp = renderer
@@ -55,7 +57,7 @@
(str "(" optional-meta ")"))))
(defn header-doc [renderer {:keys [name ns] :as m}]
- (when name
+ (when-not (str/blank? name)
(render-lines renderer
[(render-identity renderer name ns)
(optional-meta m)])))

0 comments on commit b85db55

Please sign in to comment.
Something went wrong with that request. Please try again.