Ex_doc: Deal with custom link that links to undefined/hidden module

Created on 25 Jan 2021  路  5Comments  路  Source: elixir-lang/ex_doc

`Code.Typespec` 

[code typespec](`Code.Typespec`)

Code.Typespec is a hidden module, in the first example, and ExDoc what it does is to treat format the text inside the backticks as such generating <code class="inline">Code.Typespec</code>

but when using a custom link, the generated code is
<a href="`Code.Typespec`">code typespec</a>

I am not too sure what is the best way to deal with this, probably removing the backticks and linking to Code.Typespec,
but having the backticks does not seem right

HTML Bug

Most helpful comment

Great find. We should warn and remove the link IMO. :)

All 5 comments

Great find. We should warn and remove the link IMO. :)

We are currently warning.
I am not 100% convinced of removing the link because it may hide the error, even though we are warning. A project may generate multiple warnings and this one can get buried there.
But removing it will be consistent with how we deal in the first example

Good find. I think we should definitely remove the link because there's nowhere to link to.

Alright +1 with that as we don't have any other options

I will take care of this.

Was this page helpful?
0 / 5 - 0 ratings