Added support for FollowUp line matches
This commit is contained in:
13
UApp.pas
13
UApp.pas
@@ -173,6 +173,10 @@ begin
|
||||
begin
|
||||
FLogFileName := AParams;
|
||||
end;
|
||||
'followup':
|
||||
begin
|
||||
FCurrentLineFilter.SetFollowUp(AParams);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -253,10 +257,19 @@ var
|
||||
lineFilter: TLineFilter;
|
||||
groupRanges: TGroupRanges;
|
||||
begin
|
||||
if (FCurrentLineFilter <> nil)
|
||||
and (FCurrentLineFilter.FollowUpMatch(ALine, groupRanges)) then
|
||||
begin
|
||||
WriteContent(ALine, FCurrentLineFilter.Filters, groupRanges);
|
||||
Exit;
|
||||
end else
|
||||
FCurrentLineFilter := nil; //We assume, nothing matched.
|
||||
|
||||
for lineFilter in FLineFilters do
|
||||
begin
|
||||
if lineFilter.Matches(ALine, groupRanges) then
|
||||
begin
|
||||
FCurrentLineFilter := lineFilter; //Remember the last matching filter
|
||||
WriteContent(ALine, lineFilter.Filters, groupRanges);
|
||||
Break;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user