Skip to content

Commit 4d4eb7b

Browse files
committed
When inserting Enums, only print the enum value, not the ::Type part
1 parent 024233b commit 4d4eb7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fmtspec.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ immutable FormatSpec
3939
tsep::Bool # whether to use thousand-separator
4040

4141
function FormatSpec(typ::Char;
42-
fill::Char=' ',
42+
fill::Char=' ',
4343
align::Char='\0',
4444
sign::Char='-',
4545
width::Int=-1,
@@ -167,6 +167,7 @@ type _Bin end
167167
_srepr(x) = repr(x)
168168
_srepr(x::AbstractString) = x
169169
_srepr(x::Char) = string(x)
170+
_srepr(x::Enum) = string(x)
170171

171172
function printfmt(io::IO, fs::FormatSpec, x)
172173
cls = fs.cls

0 commit comments

Comments
 (0)