Unified · Split
| @@ -1,3 +1,11 @@ | ||
| 1 | +module Docs | |
| 2 | + class NoopFilter < Filter | |
| 3 | + def call | |
| 4 | + return html | |
| 5 | + end | |
| 6 | + end | |
| 7 | +end | |
| 8 | + | |
| 1 | 9 | module Docs |
| 2 | 10 | class Tailwindcss < UrlScraper |
| 3 | 11 | self.name = 'Tailwind CSS' |
| @@ -9,7 +17,8 @@ module Docs · 5 unmodified lines | ||
| 9 | 17 | |
| 10 | 18 | html_filters.push 'tailwindcss/entries', 'tailwindcss/clean_html' |
| 11 | 19 | |
| 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") | |
| 13 | 22 | |
| 14 | 23 | # Fix redirects from older tailwind 2 docs |
| 15 | 24 | options[:fix_urls] = lambda do |url| |