Skip to content

Commit ef5eafb

Browse files
martinklepschdnolen
authored andcommitted
CLJS-1395: no trailing semicolons after JS comments
1 parent 1fa4db4 commit ef5eafb

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/main/clojure/cljs/compiler.cljc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,12 +1013,15 @@
10131013
")"))))
10141014

10151015
(defmethod emit* :js
1016-
[{:keys [env code segs args]}]
1017-
(emit-wrap env
1018-
(if code
1019-
(emits code)
1020-
(emits (interleave (concat segs (repeat nil))
1021-
(concat args [nil]))))))
1016+
[{:keys [op env code segs args]}]
1017+
(if (and code (= op :js) #?(:clj (.startsWith ^String code "/*")
1018+
:cljs (gstring/startsWith code "/*")))
1019+
(emits code)
1020+
(emit-wrap env
1021+
(if code
1022+
(emits code)
1023+
(emits (interleave (concat segs (repeat nil))
1024+
(concat args [nil])))))))
10221025

10231026
;; TODO: unify renaming helpers - this one was hard to find - David
10241027

0 commit comments

Comments
 (0)