Class: Jekyll::Spaceship::PolyfillProcessor

Inherits:
Processor
  • Object
show all
Defined in:
lib/jekyll-spaceship/processors/polyfill-processor.rb

Constant Summary

Constants inherited from Processor

Jekyll::Spaceship::Processor::DEFAULT_PRIORITY, Jekyll::Spaceship::Processor::PRIORITY_MAP

Instance Attribute Summary

Attributes inherited from Processor

#config, #exclusions, #handled, #logger, #page, #priority, #registers

Instance Method Summary collapse

Methods inherited from Processor

class_name, config, #converter, #dispatch, escape_html, exclude, #exclusion_regexs, #ext, fetch_img_data, #filename, #get_exclusion, handle_bang_link, #initialize, #initialize_exclusions, #initialize_priority, #initialize_register, make_img_tag, #name, #next?, #on_handle_html, #on_handle_html_block, #on_handled, #output_ext, #post_exclude, #pre_exclude, priority, #process?, register

Constructor Details

This class inherits a constructor from Jekyll::Spaceship::Processor

Instance Method Details

#on_handle_markdown(content) ⇒ Object



7
8
9
10
11
12
# File 'lib/jekyll-spaceship/processors/polyfill-processor.rb', line 7

def on_handle_markdown(content)
  # escape ordered list.
  rexp = /(\s*)(?<!\\)\\(?=\d+\.)/
  self.handled = true if content.match(rexp)
  content.gsub(rexp, '\1&#8291;')
end