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