Minor change to function parseScenario in RegexStoryParser

Description

Problem Statement:
When the RegexStoryParser parses out a scenario, it attempts to remove the title from the step to get the scenario without title, but the function doesn't account for Scenario:\n before the title. I don't think this will affect anything, and I don't think anything was broken initally, I just noticed as debugging that it didn't strip out the actual title because of the Scenario keyword, newline, and space before it.

Actual Code:
RegexStoryParser line 151:

String scenarioWithoutTitle = removeStart(scenarioAsText, title);

Recommended Fix:
String scenarioWithoutTitle = removeStart(scenarioAsText, keywords.scenario() + "\n " + title);

Where "\n " can be replaced with whatever new line character is being used plus the space.

Assignee

Mauro Talevi

Reporter

David Tanner

Labels

None

Time tracking

5m

Components

Fix versions

Affects versions

Priority

Trivial
Configure