Skip to content

Commit b35c948

Browse files
committed
A rich comment's closing parenthesis may be on the next line.
- Note an exception to the rule "Gather trailing parentheses" as discussed in issue #259.
1 parent bc79cb7 commit b35c948

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ of commas and line breaks.
495495

496496
=== Gather Trailing Parentheses [[gather-trailing-parens]]
497497

498-
Place all trailing parentheses on a single line instead of distinct lines.
498+
Place trailing parentheses on a single line instead of distinct lines.
499499

500500
[source,clojure]
501501
----
@@ -509,6 +509,21 @@ Place all trailing parentheses on a single line instead of distinct lines.
509509
)
510510
----
511511

512+
An exception to the rule is a rich comment for REPL-oriented programming,
513+
lest gathering the comment's closing parenthesis make the last form in the comment harder to use.
514+
A rich comment's closing parenthesis may be on the next line.
515+
516+
[source,clojure]
517+
----
518+
;; good; rich comment ends on the next line
519+
(comment
520+
(range 5)
521+
(interpose '* (range 5))
522+
(->> (range 5) (interpose '*))
523+
(= *1 *2)
524+
)
525+
----
526+
512527
=== Empty Lines Between Top-Level Forms [[empty-lines-between-top-level-forms]]
513528

514529
Use a single empty line between top-level forms.

0 commit comments

Comments
 (0)