Rel: #633
@@ -42,6 +42,7 @@ module Docs
self.text_filters = FilterStack.new
html_filters.push 'apply_base_url', 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths'
+ text_filters.push 'images' # ensure the images filter runs after all html filters
text_filters.push 'inner_html', 'clean_text', 'attribution'
def initialize
@@ -10,6 +10,8 @@ module Docs
end
def call
+ return doc if context[:download_images] == false
+
@@cache ||= {}
doc.css('img[src]').each do |node|
@@ -6,7 +6,7 @@ module Docs
params[:raw] = 1
params[:macros] = 1
- html_filters.push 'mdn/clean_html', 'images'
+ html_filters.push 'mdn/clean_html'
text_filters.insert_before 'attribution', 'mdn/contribute_link'
options[:trailing_slash] = false