We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bef385e commit 5e15c8fCopy full SHA for 5e15c8f
src/templates_parser-filter.adb
@@ -1041,17 +1041,13 @@ package body Filter is
1041
P : Parameter_Data := No_Parameter) return String
1042
is
1043
pragma Unreferenced (C);
1044
- use type GNAT.Regpat.Match_Location;
1045
-
1046
- Matches : GNAT.Regpat.Match_Array (0 .. 0);
1047
begin
1048
if P = No_Parameter then
1049
raise Template_Error with "missing parameter for MATCH filter";
1050
- end if;
1051
1052
- GNAT.Regpat.Match (P.Regexp.all, S, Matches);
+ end if;
1053
1054
- if Matches (0) = GNAT.Regpat.No_Match then
+ if GNAT.Regpat.Match (P.Regexp.all, S) = S'First - 1 then
1055
return "FALSE";
1056
else
1057
return "TRUE";
0 commit comments