Skip to content

Commit ff4b712

Browse files
committed
Condense multiple empty lines in javadoc md output
1 parent 64ed8a8 commit ff4b712

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/clojure/java/doc/impl.clj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@
155155
result)))
156156

157157
(defn print-javadoc [{:keys [class-description-md selected-method]}]
158-
(if selected-method
159-
(doseq [{:keys [method-description-md]} selected-method]
160-
(println method-description-md))
161-
(println class-description-md)))
158+
(let [condense-lines (fn [s] (str/replace s #"\n{3,}" "\n\n"))]
159+
(if selected-method
160+
(doseq [{:keys [method-description-md]} selected-method]
161+
(println (condense-lines method-description-md)))
162+
(println (condense-lines class-description-md)))))

0 commit comments

Comments
 (0)