From 7a510f6d8b127dd696492992b5079b12b8ef43c9 Mon Sep 17 00:00:00 2001 From: Gergely Gombos Date: Tue, 10 Dec 2024 21:56:00 +0100 Subject: [PATCH] remove dark images --- lib/docs/filters/react/clean_html_react_dev.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/docs/filters/react/clean_html_react_dev.rb b/lib/docs/filters/react/clean_html_react_dev.rb index 2a5ce8a2..3371089a 100644 --- a/lib/docs/filters/react/clean_html_react_dev.rb +++ b/lib/docs/filters/react/clean_html_react_dev.rb @@ -13,14 +13,18 @@ module Docs 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