History

Move method source to correct location on newer rdoc

Source was being moved above the header for ruby 4.0

Dan Arnfield committed 8 months ago

Commit 00128121 parent 5f465681 file · +2 −1Browse files

Unified · Split

lib/docs/filters/rdoc/clean_html.rb+2−1
@@ -52,7 +52,8 @@ module Docs · 51 unmodified lines
5252
5353 # Add class to differentiate Ruby code from C code
5454 css('.method-source-code').each do |node|
55− node.parent.prepend_child(node)
55+ header = node.ancestors('.method-detail').first.at_css('.method-header')
56+ header.add_next_sibling(node)
5657 pre = node.at_css('pre')
5758 pre['class'] = pre.at_css('.ruby-keyword') ? 'ruby' : 'c'
5859 end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t