History

Disable clean_text filter for tailwind - we'll customise this

IgnusG committed 4 years ago

Commit 4d1c0b41 parent 643e24f1 file · +10 −1Browse files

Showing the changes to lib/docs (1 of 1 file). Show all

Unified · Split

lib/docs/scrapers/tailwindcss.rb+10−1
@@ -1,3 +1,11 @@
1+module Docs
2+ class NoopFilter < Filter
3+ def call
4+ return html
5+ end
6+ end
7+end
8+
19 module Docs
210 class Tailwindcss < UrlScraper
311 self.name = 'Tailwind CSS'
@@ -9,7 +17,8 @@ module Docs · 5 unmodified lines
917
1018 html_filters.push 'tailwindcss/entries', 'tailwindcss/clean_html'
1119
12− # options[:container] = 'body';
20+ # Disable the clean text filter which removes empty nodes - we'll do it ourselves more selectively
21+ text_filters.replace("clean_text", "noop")
1322
1423 # Fix redirects from older tailwind 2 docs
1524 options[:fix_urls] = lambda do |url|

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t