markdown: minor style fixes

ref: #3771
This commit is contained in:
Parker Moore 2015-12-27 08:23:50 -05:00
parent a58f23aeaf
commit 8e887dcd8b
1 changed files with 8 additions and 16 deletions

View File

@ -14,8 +14,7 @@ module Jekyll
raise Errors::FatalException, "Bailing out; invalid Markdown processor." raise Errors::FatalException, "Bailing out; invalid Markdown processor."
end end
@setup = \ @setup = true
true
end end
def get_processor def get_processor
@ -33,8 +32,7 @@ module Jekyll
# are not in safe mode.) # are not in safe mode.)
def valid_processors def valid_processors
%W(rdiscount kramdown redcarpet) + \ %W(rdiscount kramdown redcarpet) + third_party_processors
third_party_processors
end end
# Public: A list of processors that you provide via plugins. # Public: A list of processors that you provide via plugins.
@ -55,9 +53,7 @@ module Jekyll
end end
def matches(ext) def matches(ext)
extname_list.include?( extname_list.include?(ext.downcase)
ext.downcase
)
end end
def output_ext(ext) def output_ext(ext)
@ -66,18 +62,14 @@ module Jekyll
def convert(content) def convert(content)
setup setup
@parser.convert( @parser.convert(content)
content
)
end end
private private
def get_custom_processor def get_custom_processor
md = @config["markdown"] converter_name = @config["markdown"]
if custom_class_allowed?(md) if custom_class_allowed?(converter_name)
self.class.const_get(md).new( self.class.const_get(converter_name).new(@config)
@config
)
end end
end end