Skip to content

Commit

Permalink
remove dark images
Browse files Browse the repository at this point in the history
  • Loading branch information
gombosg committed Dec 10, 2024
1 parent 2e1f0a0 commit 7a510f6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/docs/filters/react/clean_html_react_dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ def call

remove_selectors = [
'div.grid > a', # prev-next links
'button', # "show more" etc. buttons
'div.order-last', # code iframe containers
'a[title="Open in CodeSandbox"]', # codesandbox links
'button', # "show more" etc. buttons
'div.order-last', # code iframe containers
'div.dark-image', # dark images
'a[title="Open in CodeSandbox"]', # codesandbox links
]
css(*remove_selectors).each do |node|
node.remove
end

# Fix images not loading
css('img').remove_attr('srcset')

# Remove recipe blocks - TODO transform to outgoing link to docs
css('h4[id^="examples-"]').each do |node|
node.parent.parent.parent.remove
Expand Down

0 comments on commit 7a510f6

Please sign in to comment.