Compare commits

..

No commits in common. "6743918f44a8e60b4cb552e6102c67a7b1ae9a4c" and "a6afe468911da22071916d20899df168b7434e48" have entirely different histories.

View File

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