rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Broken links in documentation

Open natematykiewicz opened this issue 4 years ago • 2 comments

https://ruby-doc.org/stdlib-2.7.0/libdoc/rexml/rdoc/REXML/DTD/ElementDecl.html

Screen Shot 2020-04-07 at 12 09 22 AM
<p>s*(((([“‘]).*?<a href=”^/’“>”>5)|</a>*)*?)(/)?&gt;/um, true)</p>

https://ruby-doc.org/stdlib-2.7.0/libdoc/net/ftp/rdoc/Net/FTP.html Screen Shot 2020-04-07 at 12 11 54 AM

<p>The available options are:</p>
<dl class="rdoc-list note-list"><dt>port
<dd>
<p>Port number (default value is 21)</p>
</dd><dt>ssl
<dd>
<p>If <a href=":ssl">options</a> is true, then an attempt will be made to use
SSL (now TLS) to connect to the server.  For this to work <a
href="FTP/OpenSSL.html">OpenSSL</a> [OSSL] and the Ruby <a
href="FTP/OpenSSL.html">OpenSSL</a> [RSSL] extensions need to be installed.
If <a href=":ssl">options</a> is a hash, it’s passed to
OpenSSL::SSL::SSLContext#set_params as parameters.</p>
</dd><dt>private_data_connection
<dd>
<p>If true, TLS is used for data connections. Default: <code>true</code> when
<a href=":ssl">options</a> is true.</p>
</dd><dt>username
<dd>
<p>Username for login.  If <a href=":username">options</a> is the string
“anonymous” and the <a href=":password">options</a> is <code>nil</code>,
“anonymous@” is used as a password.</p>
</dd><dt>password
<dd>
<p>Password for login.</p>

All of these hrefs are wrong. I'm not exactly sure what they're supposed to be.

natematykiewicz avatar Apr 07 '20 05:04 natematykiewicz

@natematykiewicz Sorry for late.

The broken doc of Net::FTP was fixed at https://github.com/ruby/ruby/commit/c4f8095e9732aa82669a45ea55b8c24200c5dae8.

Next, the broken doc of a const variable of REXML::DTD::ElementDecl is maybe based on ruby-doc.org's template. I can't reproduce with RDoc default template. Would you provide a situation to reproduce with RDoc default template? Because I think it should have a test.

aycabta avatar Aug 02 '20 13:08 aycabta

I'm not sure the simplest way to reproduce this.

This file https://github.com/rubyapi/rubyapi/blob/master/lib/ruby_documentation_importer.rb

Uses this RDoc Generator. https://github.com/rubyapi/rubyapi/blob/master/lib/rubyapi_rdoc_generator.rb#L46

There's a RDoc::NormalClass with a full_name of REXML::DTD::ElementDecl whose method_list contains a RDoc::AnyMethod with a name of "new", which has a description of <p>s*(((([“‘]).*?<a href=”^/’“>”>5)|</a>*)*?)(/)?&gt;/um, true)</p>.

This is using RDoc 6.2.1.

natematykiewicz avatar Aug 04 '20 03:08 natematykiewicz