We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, would it be possible to extend the apply_style function to SubString type (and AbstractString in general)?
apply_style
SubString
AbstractString
Example :
julia> using Term.Trees julia> ss = SubString("abc", 1:2) "ab" julia> typeof(ss) SubString{String} julia> d = Dict("1" => "abd", "2" => ss) Dict{String, AbstractString} with 2 entries: "1" => "abd" "2" => "ab" julia> Tree(d) ERROR: MethodError: no method matching apply_style(::SubString{String}, ::String) Closest candidates are: apply_style(::String, ::String) @ Term C:\Users\franc\.julia\packages\Term\z1tSn\src\style.jl:22 apply_style(::Any; leave_orphan_tags) @ Term C:\Users\franc\.julia\packages\Term\z1tSn\src\style.jl:142
I simply suggest to dispatch the function :
function apply_style(text::AbstractString, style::String) text = convert(String, text) apply_style(text, style) end
Thanks ! fderkem
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, would it be possible to extend the
apply_style
function toSubString
type (andAbstractString
in general)?Example :
I simply suggest to dispatch the function :
Thanks !
fderkem
The text was updated successfully, but these errors were encountered: