Skip to content

Commit 4744ce4

Browse files
committed
Fix #uuid formatting inside a set literal.
1 parent 5b393ae commit 4744ce4

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

core/read.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,8 +1148,9 @@ func handleNoReaderError(reader *Reader, s Symbol) Object {
11481148
func readTagged(reader *Reader) Object {
11491149
obj := readFirst(reader)
11501150
if FORMAT_MODE {
1151-
addPrefix(obj, "#")
1152-
return obj
1151+
next := readFirst(reader)
1152+
addPrefix(next, "#" + obj.ToString(false) + " ")
1153+
return next
11531154
}
11541155
switch s := obj.(type) {
11551156
case Symbol:

tests/formatter/main/input.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,5 @@
417417
000567
418418
-0123
419419
-000567
420+
421+
(def xs #{#uuid "e00034c0-e937-4abb-aea4-80760bc338e8" #uuid "a6e0b352-3909-40a0-becc-6f9f9515b46e"})

tests/formatter/main/output.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,5 @@
417417
000567
418418
-0123
419419
-000567
420+
421+
(def xs #{#uuid "e00034c0-e937-4abb-aea4-80760bc338e8" #uuid "a6e0b352-3909-40a0-becc-6f9f9515b46e"})

0 commit comments

Comments
 (0)