Skip to content

Fix docsrs linkification for kebab case package names #147

Description

@zkat

When generating the docsrs link for a package, miette currently generates a URL like this:

  • https://docs.rs/nu-protocol/0.60.0/nu-protocol/enum.ShellError.html#variant.DivisionByZero

But the correct URL is to convert the second name to that of its rust module name, which converts - to _:

  • https://docs.rs/nu-protocol/0.60.0/nu_protocol/enum.ShellError.html#variant.DivisionByZero

This is making it so navigating to docsrs links instead redirects to, for example:

  • https://docs.rs/nu-protocol/0.60.0/nu_protocol/?search=enum.ShellError.html#variant.DivisionByZero

which is broken!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions