Class: Jekyll::AntiImageReflow

Inherits:
Object
  • Object
show all
Defined in:
lib/anti_image_reflow.rb

Class Method Summary collapse

Class Method Details

.process(content) ⇒ Object



11
12
13
14
# File 'lib/anti_image_reflow.rb', line 11

def self.process(content)
    html = content.output
    content.output = process_tags(html) if process_tags?(html)
end

.process?(doc) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/anti_image_reflow.rb', line 16

def self.process?(doc)
    (doc.is_a?(Jekyll::Page) || doc.write?) && doc.output_ext == ".html" || doc.permalink&.end_with?("/")
end