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