[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider 738f393ec1 1/8: Change the way cider-docstring--form
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cider 738f393ec1 1/8: Change the way cider-docstring--format performs formatting |
Date: |
Tue, 11 Jun 2024 03:59:33 -0400 (EDT) |
branch: elpa/cider
commit 738f393ec1264d7fbb269580964b7229cc7eb063
Author: Kato Muso <m@katomuso.io>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Change the way cider-docstring--format performs formatting
---
cider-docstring.el | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/cider-docstring.el b/cider-docstring.el
index 007bb0a8b7..965ead9930 100644
--- a/cider-docstring.el
+++ b/cider-docstring.el
@@ -149,13 +149,10 @@ Prioritize rendering as much as possible while staying
within `cider-docstring-m
(defun cider-docstring--format (string)
"Return a nicely formatted STRING to be displayed to the user."
- (let* ((string (replace-regexp-in-string "\\. " ".\n\n" string)) ;; improve
the formatting of e.g. clojure.core/reduce
- (string (mapconcat (lambda (line)
- ;; Remove spaces at the beginning of each line,
as it is common in many clojure.core defns:
- (replace-regexp-in-string "\\`[ ]+" "" line))
- (split-string string "\n")
- "\n")))
- string))
+ ;; 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 when it is displayed.
+ (replace-regexp-in-string "\n " "\n" string))
(provide 'cider-docstring)
;;; cider-docstring.el ends here
- [nongnu] elpa/cider updated (3ab2709742 -> 105da319b0), ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 738f393ec1 1/8: Change the way cider-docstring--format performs formatting,
ELPA Syncer <=
- [nongnu] elpa/cider 39ed671158 2/8: Refactor cider-clojuredocs to use cider-docstring--format, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 4b1710595f 5/8: Deprecate 3-argument call to nrepl-dict-get, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 451f72e07d 3/8: Tweak docstring of cider-docstring--format and remove redundant comment, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 54641395b6 4/8: Improve performance of nrepl-dict-get, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider abe972ad9f 7/8: Inline nrepl-dict predicates, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 9db0ceecc1 6/8: Add details to nrepl-dict commentary, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 105da319b0 8/8: Modify changelog, ELPA Syncer, 2024/06/11