mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
fix rust 1.79.0 docs std crate indexing
This commit is contained in:
parent
7d24d973e4
commit
7ff958a491
2 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,7 @@ module Docs
|
|||
css('.anchor').remove
|
||||
|
||||
css('.main-heading > h1').each do |node|
|
||||
node.at('button')&.remove
|
||||
node.parent.name = 'h1'
|
||||
node.parent.content = node.content
|
||||
end
|
||||
|
|
|
@ -9,6 +9,7 @@ module Docs
|
|||
elsif slug == 'error-index'
|
||||
'Compiler Errors'
|
||||
else
|
||||
at_css('main h1').at_css('button')&.remove
|
||||
name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘')
|
||||
mod = slug.split('/').first
|
||||
name.prepend("#{mod}::") unless name.start_with?(mod)
|
||||
|
|
Loading…
Reference in a new issue