Skip to content

Commit

Permalink
cider-docstring--format: nil-safe (#3722)
Browse files Browse the repository at this point in the history
* call cider-docstring--format after checking argument

* use when-let for DRY

* add CHANGELOG entry
  • Loading branch information
conao3 committed Jul 4, 2024
1 parent a6ccb6d commit 8a7fb48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [#3719](https://github.com/clojure-emacs/cider/pull/3719): Remove duplicated keybinding.
- Bump the injected `cider-nrepl` to [0.49.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0491-2024-06-30).
- Reduces the minimal supported Clojure version to 1.10.0 (from 1.10.3).
- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument

### Bugs fixed

Expand Down
6 changes: 3 additions & 3 deletions cider-eldoc.el
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ information."
(symbol (lax-plist-get eldoc-info "symbol"))
(docstring (or (cider--render-docstring-first-sentence eldoc-info)
(cider--render-docstring eldoc-info)
(cider-docstring--trim
(cider-docstring--format
(lax-plist-get eldoc-info "docstring")))))
(when-let (docstring (lax-plist-get eldoc-info "docstring"))
(cider-docstring--trim
(cider-docstring--format docstring)))))
;; if it's a single class (and not multiple class candidates), that's it
(maybe-class (car (lax-plist-get eldoc-info "class")))
(formatted-var (or (when maybe-class
Expand Down

0 comments on commit 8a7fb48

Please sign in to comment.