Class: Jekyll::Converters::Markdown

Inherits:
Converter
  • Object
show all
Defined in:
lib/converters/markdown-respec.rb,
lib/converters/markdown/kramdownrespec-parser.rb

Overview

Markdown converter. For more info on converters see jekyllrb.com/docs/plugins/converters/

Defined Under Namespace

Classes: KramdownRespecParser

Instance Method Summary collapse

Instance Method Details

#get_processorObject

Rubocop does not allow reader methods to have names starting with ‘get_` To ensure compatibility, this check has been disabled on this method

rubocop:disable Naming/AccessorMethodName



15
16
17
18
19
20
21
22
23
24
# File 'lib/converters/markdown-respec.rb', line 15

def get_processor
  case @config["markdown"].downcase
  when "redcarpet" then return RedcarpetParser.new(@config)
  when "kramdown"  then return KramdownParser.new(@config)
  when "rdiscount" then return RDiscountParser.new(@config)
  when "kramdown-respec" then KramdownRespecParser.new(@config)
  else
    custom_processor
  end
end

#valid_processorsObject

Public: Provides you with a list of processors, the ones we support internally and the ones that you have provided to us (if you are not in safe mode.)



30
31
32
# File 'lib/converters/markdown-respec.rb', line 30

def valid_processors
  %w(rdiscount kramdown kramdown-respec redcarpet) + third_party_processors
end