-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
This caused some unexpected errors in timholy/ProgressMeter.jl#343 (comment). The way you're supposed to find the number of lines in a string is with countlines(IOBuffer(str))
and this errors:
julia> str = Base.AnnotatedString(" julia", [(2:6, :face, :magenta)])
" julia"
julia> countlines(IOBuffer(str))
ERROR: MethodError: no method matching IOBuffer(::Base.AnnotatedString{String})
The type `IOBuffer` exists, but no method is defined for this combination of argument types when trying to construct it.
Closest candidates are:
IOBuffer(::SubString{String})
@ Base strings/io.jl:309
IOBuffer(::String)
@ Base strings/io.jl:308
IOBuffer(; read, write, append, truncate, maxsize, sizehint)
@ Base iobuffer.jl:119
...
Stacktrace:
[1] top-level scope
@ REPL[14]:1
Metadata
Metadata
Assignees
Labels
No labels