Fixed issues #343 and #378, which describe problems with relative indentation. According to the README, the 'relative' keyword should use the same indentation as the previous line. However, the code actually looks up lines after the current line to determine the relative indentation. The PR adds the 'relativeUp' keyword to use indentation from previous lines. It also fixes an issue with multiple Rules in a single feature file, which resulted in wrong indentation for all but the first rule.
Result before this PR (notice the But and the last @tag not being indented correctly):
@tag
Feature: Some Feature
@tag
Rule: Some rule
Some description
@tag
Scenario:
Some description
Given Start to type your Given step here
And something else
But something different
When Start to type your When step here
Then Start to type your Then step here
@tag
Rule: Some rule
Some description
Result with this PR:
@tag
Feature: Some Feature
@tag
Rule: Some rule
Some description
@tag
Scenario:
Some description
Given Start to type your Given step here
And something else
But something different
When Start to type your When step here
Then Start to type your Then step here
@tag
Rule: Some rule
Some description
Fixed issues #343 and #378, which describe problems with relative indentation. According to the README, the 'relative' keyword should use the same indentation as the previous line. However, the code actually looks up lines after the current line to determine the relative indentation. The PR adds the 'relativeUp' keyword to use indentation from previous lines. It also fixes an issue with multiple Rules in a single feature file, which resulted in wrong indentation for all but the first rule.
Result before this PR (notice the
But
and the last@tag
not being indented correctly):Result with this PR: