Skip to content

Commit a9d29cf

Browse files
committed
refactor: fix nullable warning
1 parent 91efb7a commit a9d29cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WeihanLi.Common/Template/DefaultTemplateParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public Task<TemplateRenderContext> ParseAsync(string text)
3131
var pipeValue = match.Groups["Pipe"]?.Value.Trim();
3232
if (!string.IsNullOrEmpty(pipeValue))
3333
{
34-
var pipeIndex = pipeValue.IndexOf('|');
34+
var pipeIndex = pipeValue!.IndexOf('|');
3535
if (pipeIndex < 0)
3636
{
3737
match = match.NextMatch();
@@ -40,7 +40,7 @@ public Task<TemplateRenderContext> ParseAsync(string text)
4040

4141
// exact pipes
4242
pipeValue = pipeValue[pipeIndex..].Trim();
43-
var pipeInputs = pipeValue!.Split(['|'], StringSplitOptions.RemoveEmptyEntries);
43+
var pipeInputs = pipeValue.Split(['|'], StringSplitOptions.RemoveEmptyEntries);
4444
pipes = pipeInputs.Select(p =>
4545
{
4646
var pipeName = p.Trim();

0 commit comments

Comments
 (0)