File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -149,13 +149,10 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m
149
149
150
150
(defun cider-docstring--format (string )
151
151
" Return a nicely formatted STRING to be displayed to the user."
152
- (let* ((string (replace-regexp-in-string " \\ . " " .\n\n " string)) ; ; improve the formatting of e.g. clojure.core/reduce
153
- (string (mapconcat (lambda (line )
154
- ; ; Remove spaces at the beginning of each line, as it is common in many clojure.core defns:
155
- (replace-regexp-in-string " \\ `[ ]+" " " line))
156
- (split-string string " \n " )
157
- " \n " )))
158
- string))
152
+ ; ; As this is a literal docstring from the source code and
153
+ ; ; there are two spaces at the beginning of lines in docstrings,
154
+ ; ; we remove them to make it align nicely when it is displayed.
155
+ (replace-regexp-in-string " \n " " \n " string))
159
156
160
157
(provide 'cider-docstring )
161
158
; ;; cider-docstring.el ends here
You can’t perform that action at this time.
0 commit comments