Skip to content

Commit

Permalink
Refactor cider-clojuredocs to use cider-docstring--format
Browse files Browse the repository at this point in the history
  • Loading branch information
katomuso committed Jun 9, 2024
1 parent 3a0e231 commit 767e49b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cider-clojuredocs.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@

(require 'cider-client)
(require 'cider-common)
(require 'subr-x)
(require 'cider-docstring)
(require 'cider-popup)
(require 'cider-util)

(require 'nrepl-dict)

(require 'subr-x)
(require 'url-vars)

(defconst cider-clojuredocs-url "https://clojuredocs.org/")
Expand Down Expand Up @@ -120,10 +120,7 @@ opposite of what that option dictates."
(insert (format " [%s]\n" arglist)))
(newline))
(when-let* ((doc (nrepl-dict-get dict "doc"))
;; As this is a literal docstring from the source code and
;; there are two spaces at the beginning of lines in docstrings,
;; we remove them to make it align nicely in ClojureDocs buffer.
(doc (replace-regexp-in-string "\n " "\n" doc)))
(doc (cider-docstring--format doc)))
(insert doc "\n")
(newline)))

Expand Down

0 comments on commit 767e49b

Please sign in to comment.