lib/cucumber/ast/feature_element.rb in kosmas58-cucumber-0.3.95 vs lib/cucumber/ast/feature_element.rb in kosmas58-cucumber-0.3.96
- old
+ new
@@ -19,10 +19,10 @@
def first_line_length
name_line_lengths[0]
end
def name_line_lengths
- if @name.empty?
+ if @name.strip.empty?
[@keyword.jlength]
else
@name.split("\n").enum_for(:each_with_index).map do |line, line_number|
line_number == 0 ? @keyword.jlength + line.jlength : line.jlength + Ast::Step::INDENT - 1 # We -1 as names which are not keyword lines are missing a space between keyword and name
end