Skip to content

Commit 8a7fb48

Browse files
authored
cider-docstring--format: nil-safe (#3722)
* call cider-docstring--format after checking argument * use when-let for DRY * add CHANGELOG entry
1 parent a6ccb6d commit 8a7fb48

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [#3719](https://github.com/clojure-emacs/cider/pull/3719): Remove duplicated keybinding.
1818
- Bump the injected `cider-nrepl` to [0.49.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0491-2024-06-30).
1919
- Reduces the minimal supported Clojure version to 1.10.0 (from 1.10.3).
20+
- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument
2021

2122
### Bugs fixed
2223

cider-eldoc.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ information."
218218
(symbol (lax-plist-get eldoc-info "symbol"))
219219
(docstring (or (cider--render-docstring-first-sentence eldoc-info)
220220
(cider--render-docstring eldoc-info)
221-
(cider-docstring--trim
222-
(cider-docstring--format
223-
(lax-plist-get eldoc-info "docstring")))))
221+
(when-let (docstring (lax-plist-get eldoc-info "docstring"))
222+
(cider-docstring--trim
223+
(cider-docstring--format docstring)))))
224224
;; if it's a single class (and not multiple class candidates), that's it
225225
(maybe-class (car (lax-plist-get eldoc-info "class")))
226226
(formatted-var (or (when maybe-class

0 commit comments

Comments
 (0)