Revert back to an intialize more similar to the original

This commit is contained in:
John Piasetzki 2014-03-22 15:44:19 -04:00 committed by John Piasetzki
parent 446ca8f73d
commit cf81331b39
1 changed files with 7 additions and 4 deletions

View File

@ -12,10 +12,13 @@ module Jekyll
super super
if markup.strip =~ SYNTAX if markup.strip =~ SYNTAX
@lang = $1.downcase @lang = $1.downcase
@options = Hash[$2.split.map do |opt| @options = {}
key, value = opt.split("=") if defined?($2) && $2 != ''
[key.to_sym, (value || true)] $2.split.each do |opt|
end] key, value = opt.split('=')
@options[key.to_sym] = value || true
end
end
@options[:linenos] = "inline" if @options.key?(:linenos) and @options[:linenos] == true @options[:linenos] = "inline" if @options.key?(:linenos) and @options[:linenos] == true
else else
raise SyntaxError.new <<-eos raise SyntaxError.new <<-eos