Skip to content

Commit 21914ce

Browse files
bjeanesdnolen
authored andcommitted
CLJS-1457 Munge unicode kws/syms constant names
1 parent 2fa41e7 commit 21914ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/clojure/cljs/analyzer.cljc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,12 @@
380380
(str value))
381381
name (if (= "." name)
382382
"_DOT_"
383-
(-> name (string/replace "-" "_DASH_") (munge) (string/replace "." "$")))]
383+
(-> name
384+
(string/replace "-" "_DASH_")
385+
(munge)
386+
(string/replace "." "$")
387+
(string/replace #"(?i)[^a-z0-9$_]"
388+
#(str "_u" (format "%04x" (int (first %))) "_"))))]
384389
(symbol (str prefix name))))
385390

386391
(defn- register-constant!

0 commit comments

Comments
 (0)