Skip to content
New issue

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

Warning: No method for converting Org.RegularLink to a term representation currently exists #24

Open
nathanaelbosch opened this issue Jan 2, 2024 · 3 comments

Comments

@nathanaelbosch
Copy link

This warning came up a lot when I tried out the package:

Warning: No method for converting Org.RegularLink to a term representation currently exists

It would be great to have this fixed!

@nathanaelbosch
Copy link
Author

nathanaelbosch commented Jan 2, 2024

As a first try to fix this issue I did:

term(io::IO, l::Org.RegularLink, s::Vector{String}) = (term(io, l.description[1]); term(io, l.path))

This removes the warnings and shows the description correctly, but the path is not rendered.

EDIT: A more robust version seems to be

term(io::IO, l::Org.RegularLink, s::Vector{String}) = begin
    if !isnothing(l.description)
        for d in l.description
            term(io, d)
        end
    end
    term(io, l.path)
end

@tecosaur
Copy link
Owner

Thanks, Nathanael! As it happens term(io::IO, o::OrgDoc, link::RegularLink, stylecodes::Vector{String}=String[]) already exists but the warning isn't very good. I'll see what I can do about that.

@tecosaur
Copy link
Owner

I've just pushed 7ec8d9d, which should help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants