Compare commits
2 Commits
a6afe46891
...
6743918f44
Author | SHA1 | Date | |
---|---|---|---|
6743918f44 | |||
030e5fdd3d |
@ -76,8 +76,7 @@ public sealed class TemplateInlineParser : InlineParser
|
||||
ReadOnlySpan<char> result = ReadNext(argumentSpan, ref index, false, out bool hasValue);
|
||||
if (!hasValue)
|
||||
{
|
||||
var argument = result.ToString();
|
||||
argumentList.Add(argument);
|
||||
argumentList.Add(result.ToString());
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -105,6 +104,8 @@ public sealed class TemplateInlineParser : InlineParser
|
||||
out bool hasValue)
|
||||
{
|
||||
var isEscaped = false;
|
||||
|
||||
int startIndex = index;
|
||||
for (; index < argumentSpan.Length; index++)
|
||||
{
|
||||
char currentChar = argumentSpan[index];
|
||||
@ -120,16 +121,16 @@ public sealed class TemplateInlineParser : InlineParser
|
||||
|
||||
case '|' when !isEscaped:
|
||||
hasValue = false;
|
||||
return argumentSpan[..index];
|
||||
return argumentSpan[startIndex..index];
|
||||
|
||||
case '=' when !isEscaped && !consumeToken:
|
||||
hasValue = true;
|
||||
return argumentSpan[..index];
|
||||
return argumentSpan[startIndex..index];
|
||||
}
|
||||
}
|
||||
|
||||
hasValue = false;
|
||||
return argumentSpan[..index];
|
||||
return argumentSpan[startIndex..index];
|
||||
}
|
||||
|
||||
private static ReadOnlySpan<char> ReadUntilClosure(ReadOnlySpan<char> input)
|
||||
|
Loading…
Reference in New Issue
Block a user