Skip to content

Commit 071b8b1

Browse files
committed
make colon prettier
1 parent 34fc3e1 commit 071b8b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/varname.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ function Base.show(io::IO, vn::VarName)
9393
print(io, getsym(vn))
9494
for indices in getindexing(vn)
9595
print(io, "[")
96-
join(io, indices, ",")
96+
join(io, map(replace_colon_string, indices), ",")
9797
print(io, "]")
9898
end
9999
end
100100

101+
replace_colon_string(x) = x
102+
replace_colon_string(::Colon) = ":"
101103

102104
"""
103105
Symbol(vn::VarName)

0 commit comments

Comments
 (0)