Closed eproxus closed 1 year ago
@eproxus, I'm not sure this is dealt with by the plugin. I also have a similar issue when using {@link ...}
. I'm not sure this is an ex_doc
issue, tbh. Maybe @starbelly knows best if this is from the chunk generation, or something else (?)
@starbelly, tested this again, and, as-is, this throws an exception with ex_doc
but generates a proper link with EDoc.
I will take a gander.
Yeah, I'm also setting this up to see if it's easily fixable next to ex_doc
.
@paulo-ferraz-oliveira An example would be good, it works for me, but @eproxus is referencing a form with curly brackets, which I'm not familar with. Also, edoc complains saying @type
is deprecated btw.
Yeah, I can't get all of EDoc to work as per its documentation either.
The form @eproxus is mentioning is indeed deprecated, but still supported by EDoc...
Technically speaking @type
period is deprecated AFAIK. The {@type {option, thing()@}}
I could only find used in edoc itself and two places in epp_dodger. Its use seems limited to when you have a property list for options, but maybe there's other uses for it? A tad off subject from the fact that it can cause a crash, but still interesting and all simply a "FWIW".
Yeah, I'll let you decide on this one. If the ex_doc
fix lands maybe we can close this, unless @eproxus is interested in writing some tests cases for which we'd need to see the code pass 😉
The pull request mentioned above was merged. No further changes regarding {@type ...}
are expected. I don't think that this addresses your issue, but ex_doc
's maintainers preferred a simpler solution (simply not crash).
I referred "Links are not usable, because generated HTML..." and ultimate we got "I'd strip out the \ and just leave \ but it definitely doesn't hurt to keep it this way for now."
The mentioned pull request is already merged, tagged, released (ex_doc
) and imported and released here (rebar3_ex_doc
). Closing...
Didn't exactly understand what was said here. What would the alternative to {@type ...}
be to achieve type links using EDoc + the ex_doc plugin?
@eproxus, there is no alternative, as of this moment.
ex_doc
(via the pull request) didn't accept that valid links were generated: https://github.com/elixir-lang/ex_doc/pull/1787#issuecomment-1744295489 (here's the test I wrote to make sure generation created at least "a" link, and that's what was accepted).
So I don't think that, at least now, the plugin can move much more forward on this.
When using the
{@type mytype()}
syntax, a link is generated to#type-mytype
but the ExDoc equivalent should be#t:mytype/0
it seems.