Skip to content

Commit

Permalink
fix: ignore escape behavior on remainder parameters (#994)
Browse files Browse the repository at this point in the history
Co-authored-by: Quahu <quahu@gmail.com>
  • Loading branch information
foxbot and Quahu committed Jun 5, 2019
1 parent a8c853f commit 2e95c49
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Discord.Net.Commands/CommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ char GetMatch(IReadOnlyDictionary<char, char> dict, char ch)
else
c = '\0';

//If we're processing an remainder parameter, ignore all other logic
if (curParam != null && curParam.IsRemainder && curPos != endPos)
{
argBuilder.Append(c);
continue;
}

//If this character is escaped, skip it
if (isEscaping)
{
Expand All @@ -79,13 +86,6 @@ char GetMatch(IReadOnlyDictionary<char, char> dict, char ch)
continue;
}

//If we're processing an remainder parameter, ignore all other logic
if (curParam != null && curParam.IsRemainder && curPos != endPos)
{
argBuilder.Append(c);
continue;
}

//If we're not currently processing one, are we starting the next argument yet?
if (curPart == ParserPart.None)
{
Expand Down

0 comments on commit 2e95c49

Please sign in to comment.