Fix rails clean_html_guides filter

pull/1688/head
Enoc 3 years ago
parent a4d6ad1bb8
commit 7e571ee48c

@ -24,7 +24,9 @@ module Docs
css('pre').each do |node|
code = node.at_css('code')
language = code['class'][/highlight ?(\w+)/, 1]
language = code['class']
break if language.nil?
language = language [/highlight ?(\w+)/, 1]
node['data-language'] = language unless language == 'plain'
code.remove_attribute('class')
node.content = node.content.strip

@ -109,7 +109,6 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc('https://rubyonrails.org/', opts)
doc
doc.at_css('.heading__button span').content.scan(/\d\.\d*\.*\d*\.*\d*/)[0]
end
end

Loading…
Cancel
Save