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

Incompatibility with RDoc link syntax #210

Closed
weppos opened this issue Dec 5, 2010 · 4 comments
Closed

Incompatibility with RDoc link syntax #210

weppos opened this issue Dec 5, 2010 · 4 comments

Comments

@weppos
Copy link
Contributor

weppos commented Dec 5, 2010

The following documentation section

= Public Suffix Service

<b>Public Suffix Service</b> is a Ruby domain name parser based on the {Public Suffix List}[http://publicsuffix.org].

is not correctly recognized by YARD 0.6.3.

[warn]: In file `README.rdoc':4: Cannot resolve link to Public from text:
[warn]: {Public Suffix List}...
[warn]: In file `README.rdoc':84: Cannot resolve link to RubyGems from text:
[warn]: {RubyGems}...
@lsegal
Copy link
Owner

lsegal commented Dec 5, 2010

Unfortunately the QuickRef was the only reference I could find regarding link syntax. Can you show me an official document listing the link syntax you provided?

The reference I found shows that RDoc link syntax is the following:

http://www.zenspider.com/Languages/Ruby/QuickRef.html#54

If this has changed in recent versions without the RDoc maintainers first checking for compatibility issues, there's unfortunately not much that can be done.

@weppos
Copy link
Contributor Author

weppos commented Dec 5, 2010

From http://rdoc.rubyforge.org/RDoc.html

Hyperlinks to the web starting http:, mailto:, ftp:, or www. are recognized. An HTTP url that references an external image file is converted into an inline . Hyperlinks starting ‘link:’ are assumed to refer to local files whose path is relative to the —op directory.
Hyperlinks can also be of the form label[url], in which case the label is used in the displayed text, and url is used as the target. If label contains multiple words, put it in braces: {multi word label}[url].
Example hyperlinks:
link:RDoc.html
http://rdoc.rubyforge.org
mailto:user@example.com
{RDoc Documentation}[http://rdoc.rubyforge.org]
{RDoc Markup}[link:RDoc/Markup.html]

@lsegal
Copy link
Owner

lsegal commented Dec 20, 2010

Sorry it took so long to get back to you on this. After further inspection, there doesn't seem to be a problem with YARD.

My guess is you're running this on ruby 1.8.7 with the standard RDoc that came packaged with the install (not the gem version). This version, as I pointed out, did not have this syntax. It was introduced in a 2.x version, which only started to get packaged with Ruby in 1.9.x. You can also gem install rdoc to get it. Using an updated rdoc resolves the issue for me.

For reference, YARD actually doesn't apply its own {...} translations until after the initial markup is processed (by rdoc, or whatever library you use). So by the time YARD gets to it, the {foo}[bar] will have been translated into a proper link-- if that syntax is supported. In this case, the syntax was picked up by YARD because RDoc was not translating it.

@weppos
Copy link
Contributor Author

weppos commented Dec 20, 2010

Ops, my bad. You're right, I installed the most updated version and it worked.

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

No branches or pull requests

2 participants