Skip to content

Commit

Permalink
Fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkorstanje committed Apr 13, 2024
1 parent 9d13b34 commit a911caa
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions dotnet/Gherkin/GherkinLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,19 @@ private IEnumerable<Tuple<string, int>> SplitCells(string row)
startPos = pos;
} else if (c == GherkinLanguageConstants.TABLE_CELL_ESCAPE_CHAR) {
bool hasNext = rowEnum.MoveNext();
pos++;
c = hasNext ? rowEnum.Current : "";
if (c == GherkinLanguageConstants.TABLE_CELL_NEWLINE_ESCAPE) {
cell += "\n";
} else {
if (c.ToString() != GherkinLanguageConstants.TABLE_CELL_SEPARATOR && c != GherkinLanguageConstants.TABLE_CELL_ESCAPE_CHAR) {
cell += GherkinLanguageConstants.TABLE_CELL_ESCAPE_CHAR;
if(hasNext) {
pos++;
c = rowEnum.Current;
if (c == GherkinLanguageConstants.TABLE_CELL_NEWLINE_ESCAPE) {
cell += "\n";
} else {
if (c.ToString() != GherkinLanguageConstants.TABLE_CELL_SEPARATOR && c != GherkinLanguageConstants.TABLE_CELL_ESCAPE_CHAR) {
cell += GherkinLanguageConstants.TABLE_CELL_ESCAPE_CHAR;
}
cell += c;
}
cell += c;
} else {
cell += GherkinLanguageConstants.TABLE_CELL_ESCAPE_CHAR;
}
} else {
cell += c;
Expand Down

0 comments on commit a911caa

Please sign in to comment.