lib/middleman-presentation/new_slide.rb in middleman-presentation-0.15.6 vs lib/middleman-presentation/new_slide.rb in middleman-presentation-0.15.7

- old
+ new

@@ -10,11 +10,11 @@ attr_reader :input, :name, :base_path, :slide_directory_path public def initialize(input, base_path:) - @input = input + @input = input.split(/:/) @name = extract_name @slide_directory_path = Pathname.new(base_path) @base_path = @slide_directory_path.dirname end @@ -129,19 +129,17 @@ def extname?(*extensions) extensions.any? { |e| extname == e } end def extract_name - input.split(/:/).last + input.last end # Extract group from name def extract_group - group = input.split(/:/).first + return nil if input.size < 2 # no group given - return nil if group == name - - group.to_s + input.first.to_s end end end end