[devdocsgjs/main: 181/239] Disable clean_text filter for tailwind - we'll customise this
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 181/239] Disable clean_text filter for tailwind - we'll customise this
- Date: Fri, 8 Apr 2022 07:47:42 +0000 (UTC)
commit 4d1c0b406b4dddaaeb48fec2fb5fa4d16f6f3ea7
Author: IgnusG <6438760+IgnusG users noreply github com>
Date: Mon Feb 21 21:38:29 2022 +0100
Disable clean_text filter for tailwind - we'll customise this
lib/docs/scrapers/tailwindcss.rb | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/lib/docs/scrapers/tailwindcss.rb b/lib/docs/scrapers/tailwindcss.rb
index 975b776f..e7ad9219 100644
--- a/lib/docs/scrapers/tailwindcss.rb
+++ b/lib/docs/scrapers/tailwindcss.rb
@@ -1,3 +1,11 @@
+module Docs
+ class NoopFilter < Filter
+ def call
+ return html
+ end
+ end
+end
+
module Docs
class Tailwindcss < UrlScraper
self.name = 'Tailwind CSS'
@@ -9,7 +17,8 @@ module Docs
html_filters.push 'tailwindcss/entries', 'tailwindcss/clean_html'
- # options[:container] = 'body';
+ # Disable the clean text filter which removes empty nodes - we'll do it ourselves more selectively
+ text_filters.replace("clean_text", "noop")
# Fix redirects from older tailwind 2 docs
options[:fix_urls] = lambda do |url|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]