Question

I'm trying to create some links in my YARD documentation. I can get an HTTP link:

# I like {http://stackoverflow.com Stackoverflow}

renders as

<p>I like <a href="http://stackoverflow.com">Stackoverflow</a></p>

But an email link:

# You can email the {mailto:bugs@myproject.com bugs} list

gives me a warning:

[warn]: In file `':: Cannot resolve link to mailto:bugs@myprojectmailto:bugs@myproject.com from text:

and renders as

<p>You can email the <tt>bugs</tt> list</p>

I've tried the regular RDoc syntax for links:

bugs[mailto:bugs@myproject.com]

but YARD seems to ignore that. Does anyone know of a more reliable syntax?

Was it helpful?

Solution

Digging into YARD's code shows the problem: in gems/yard-0.2.3.5/lib/yard there is the line (73):

if name.include?("://")

which doesn't allow mailto links. You can replace this line with

if name.include?("://") or name.include?("mailto:")

and it will work as you want... not exactly ideal, but that's all I've got right now.

OTHER TIPS

0.2.3.6 will have this support

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top