diff --git a/lib/docs/filters/react/clean_html_react_dev.rb b/lib/docs/filters/react/clean_html_react_dev.rb index 6e1e9f5c..07c47726 100644 --- a/lib/docs/filters/react/clean_html_react_dev.rb +++ b/lib/docs/filters/react/clean_html_react_dev.rb @@ -4,6 +4,21 @@ module Docs def call @doc = at_css('article') + # Remove breadcrumbs before h1 + css('h1').each do |node| + node.previous.remove + end + + # Remove prev-next links + css('div.grid > a').each do |node| + node.remove + end + + # Remove styling divs + css('div[class*="ps-0"]', 'div[class*="mx-"]', 'div[class*="px-"]', 'div[class=""]', 'div.cm-line').each do |node| + node.before(node.children).remove + end + doc end end