diff --git a/Pipelines/templates/nbgv-set-version-steps.yml b/Pipelines/templates/nbgv-set-version-steps.yml index 5ca7752d..ca3a54eb 100644 --- a/Pipelines/templates/nbgv-set-version-steps.yml +++ b/Pipelines/templates/nbgv-set-version-steps.yml @@ -1,5 +1,5 @@ steps: -- script: 'dotnet tool install -g nbgv' +- script: 'dotnet tool update -g nbgv' displayName: 'Install GitVersioning' - task: PowerShell@2 displayName: Set Release Version diff --git a/RulesEngine/WithinOperation.cs b/RulesEngine/WithinOperation.cs index 49e7795c..07a8a4c3 100644 --- a/RulesEngine/WithinOperation.cs +++ b/RulesEngine/WithinOperation.cs @@ -75,9 +75,9 @@ public OperationResult WithinOperationDelegate(Clause c, object? state1, object? { var startLine = tc.GetLocation(capture.Index).Line; // Before is already a negative number - var start = tc.LineEnds[Math.Max(1, startLine + wc.Before)]; + var start = tc.LineStarts[Math.Max(1, startLine + wc.Before)]; var end = tc.LineEnds[Math.Min(tc.LineEnds.Count - 1, startLine + wc.After)]; - var res = ProcessLambda(tc.FullContent[start..end], capture); + var res = ProcessLambda(tc.FullContent[start..(end+1)], capture); if (res.Result) { if (res.Capture is TypedClauseCapture> boundaryList)