Skip to content

Commit 39ed671

Browse files
katomusobbatsov
authored andcommitted
Refactor cider-clojuredocs to use cider-docstring--format
1 parent 738f393 commit 39ed671

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

cider-clojuredocs.el

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525

2626
;;; Code:
2727

28+
(require 'subr-x)
29+
(require 'url-vars)
30+
2831
(require 'cider-client)
2932
(require 'cider-common)
30-
(require 'subr-x)
33+
(require 'cider-docstring)
3134
(require 'cider-popup)
3235
(require 'cider-util)
33-
3436
(require 'nrepl-dict)
3537

36-
(require 'url-vars)
37-
3838
(defconst cider-clojuredocs-url "https://clojuredocs.org/")
3939

4040
(defconst cider-clojuredocs-buffer "*cider-clojuredocs*")
@@ -120,10 +120,7 @@ opposite of what that option dictates."
120120
(insert (format " [%s]\n" arglist)))
121121
(newline))
122122
(when-let* ((doc (nrepl-dict-get dict "doc"))
123-
;; As this is a literal docstring from the source code and
124-
;; there are two spaces at the beginning of lines in docstrings,
125-
;; we remove them to make it align nicely in ClojureDocs buffer.
126-
(doc (replace-regexp-in-string "\n " "\n" doc)))
123+
(doc (cider-docstring--format doc)))
127124
(insert doc "\n")
128125
(newline)))
129126

0 commit comments

Comments
 (0)