Skip to content

Commit

Permalink
Return \\ as \ issue fix, also return \" as "
Browse files Browse the repository at this point in the history
  • Loading branch information
magicops authored Jul 15, 2019
1 parent 22f446e commit 351ae40
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Source/CSharp/Expressive/Expressive/ExpressionParser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Expressive.Exceptions;
using Expressive.Exceptions;
using Expressive.Expressions;
using Expressive.Functions;
using Expressive.Functions.Conversion;
Expand Down Expand Up @@ -490,6 +490,14 @@ private static string CleanString(string input)
buffer[outIdx++] = '\'';
i++;
continue;
case '\"':
buffer[outIdx++] = '\"';
i++;
continue;
case '\\':
buffer[outIdx++] = '\\';
i++;
continue;
}
}
}
Expand Down Expand Up @@ -602,7 +610,7 @@ private static string GetString(string expression, int startIndex, char quoteCha
var character = expression[index];
bool isEscape = false;

char[] escapableCharacters = new char[] { '\\', '"', '\'', 't', 'n', 'r', 'b', 'f', '0' };
char[] escapableCharacters = new char[] { '\\', '"', '\'', 't', 'n', 'r' };

while (index < expression.Length && !foundEndingQuote)
{
Expand Down

0 comments on commit 351ae40

Please sign in to comment.