Change default ruby parser to RDoc::Parser::PrismRuby#1581
Change default ruby parser to RDoc::Parser::PrismRuby#1581tompng wants to merge 1 commit intoruby:masterfrom
Conversation
|
🚀 Preview deployment available at: https://a0f2332e.rdoc-6cd.pages.dev (commit: d1eaa56) |
| # Here is the <tt>:call-seq:</tt> directive given for this method: | ||
| # | ||
| # :call-seq: | ||
| # \:call-seq: |
There was a problem hiding this comment.
RDoc::Parser::Ruby specially handles :call-seq:.
# This is a call-seq
# :call-seq: foo(x)
#
# This is a code block in RDoc::Parser::Ruby,
# but a second call-seq in RDoc::Prism::PrismRuby
# :call-seq: foo(y)
#
# Code block in both parser
# \:call-seq: foo(z)
def foo(*); endIndented directives are allowed because indented :include: have special meaning.
# include a file with all lines indented
# :include: file.rb2445ddc to
74047b0
Compare
74047b0 to
d1eaa56
Compare
|
Generating document in 1 file renamed, 3 non-empty files deleted, 69 empty files deleted 1 file renamedRenamed file: The bug below is fixed: module RubyVM::ZJIT
end
class << RubyVM::ZJIT # This moves /RubyVM/ZJIT.html to /ZJIT.html
end3 non-empty files deleted.All these three class/modules are surrounded by 7 linked empty files deletedAll class/modules has 62 unlinked empty files deletedWrong crossref fixed in 5 files
CrossRef added in 50 filesSome might be problematic and needs backslash to suppress crossref.
Other crossref change in 2 files
Other change in 29 filesSome files includes whitespace difference like this: <pre class="ruby"><span class="ruby-identifier">code</span>
</pre>
<!-- ↓ -->
<pre class="ruby"><span class="ruby-identifier">code</span></pre>
|
Running rdoc in rails/railsBasically the same as running in ruby/ruby, but there are additional differences. module M
included do
attr_reader :attr1 # ClassIncludingM#attr1, not M#attr1
def f; end # ClassIncludingM#attr, not M#f
include M1 # ClassIncludingM includes M1
end
class_methods do
attr_reader :attr2 # ClassIncludingM.attr2, not M#attr2 nor M.attr2
def g; end # ClassIncludingM.g, not M#g nor M.g
include M2 # ClassIncludingM extends M2
end
end
class ClassIncludingM; include M; endSome important but wrong document might disappear, but I think it could be considered bugfix. Running sdoc in rails/railsMany more differences are generated because of |
|
I tried this in ruby/prism and it seems to either hang or take a very long time. Currently it takes about 30 seconds, with prism I cancelled after 5 minutes. It hangs on To reproduce, I changed rdoc in the gemfile to To be clear, not specific to his PR. I reproduce this on currently released rdoc with |
|
@Earlopain Thank you for trying it and letting me know. #1596 will fix it. |
Fixes #398, #782, #816, #1555, #885, #1373, #1553
Although generated HTML has huge difference, many many bugs are fixed with
RDoc::Parser::PrismRubyparser.Diffs are mostly: many bugfixes, crossrefs, trailing whitespaces in syntax highlight, and perhaps few new bugs.
Old parser can be used with
RDOC_USE_RIPPER_PARSER=1