[devdocsgjs/main: 1528/1867] Remove unnecessary classes
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1528/1867] Remove unnecessary classes
- Date: Fri, 19 Nov 2021 23:48:07 +0000 (UTC)
commit 306b264d763ce96d9ef47c2305f54727cc6f2214
Author: dohsimpson <mydohsimpson gmail com>
Date: Tue Feb 23 00:53:29 2021 -0500
Remove unnecessary classes
lib/docs/filters/react_bootstrap/clean_html.rb | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/lib/docs/filters/react_bootstrap/clean_html.rb b/lib/docs/filters/react_bootstrap/clean_html.rb
index a8117a9a..f7bd995d 100644
--- a/lib/docs/filters/react_bootstrap/clean_html.rb
+++ b/lib/docs/filters/react_bootstrap/clean_html.rb
@@ -12,6 +12,14 @@ module Docs
node['data-language'] = 'jsx'
node.parent.replace(node)
end
+
+ css('div, main, pre, h1, h2, h3, h4, h5, h6, a, p').each do |node|
+ node.delete 'class'
+ end
+
+ css('#___gatsby, #gatsby-focus-wrapper').each do |node|
+ node.delete 'id'
+ end
doc
end
end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]